Apache2密码保护目录但允许本地访问而无需密码提示

时间:2022-10-06 07:58:59

I am using apache2 webserver and have configured directory protection which works OK. However On the pc that is hosting my apache2 webserver I need to access the site without apache2 prompting for username and password. I have tried many of the suggested solutions out there but have not been able to get this darn thing to work. At the moment I am forced to enter username/password to access the site from the same machine ? This is my apache2.conf setup --- any help would be most appreciated.

我正在使用apache2 webserver并配置了目录保护,它可以正常工作。但是在托管我的apache2 webserver的电脑上,我需要访问该网站,而不需要apache2提示输入用户名和密码。我已经尝试了很多建议的解决方案,但是还没有能够让这个令人难忘的工作。目前我*输入用户名/密码从同一台机器访问该网站?这是我的apache2.conf设置---任何帮助都将非常感激。

<Directory /var/www>
AuthName Login
AuthType Basic
AuthUserFile /usr/local/bin/passwords
Require valid-user
Allow from 127.0.0.1
Satisfy Any
</Directory>

The above is the basic setup I have but I hav tried a number of variations to this but still cannot seem to access my site from the local machine (that host's the site) via firefox. My apache2 server is also configured to operate on port 888 rather that the normal port 80 - I need to do this because my local ISP blocks port 80?

以上是我的基本设置,但我尝试了很多变种,但似乎仍然无法通过Firefox从本地机器(该主机的网站)访问我的网站。我的apache2服务器也配置为在端口888上运行,而不是正常的端口80 - 我需要这样做,因为我的本地ISP阻塞端口80?

I need to access the local site from the server machine using firefox but without it asking for username & passwords (required only for external access)

我需要使用firefox从服务器机器访问本地站点,但不需要用户名和密码(仅限外部访问)

1 个解决方案

#1


0  

You may check the directive Satisfy again and have a look to the directive location

您可以再次检查指令Satisfy并查看指令位置

Edit: Your question may also be a duplicate of this one

编辑:您的问题也可能与此问题重复

#1


0  

You may check the directive Satisfy again and have a look to the directive location

您可以再次检查指令Satisfy并查看指令位置

Edit: Your question may also be a duplicate of this one

编辑:您的问题也可能与此问题重复