大佬教程收集整理的这篇文章主要介绍了linux – Apache“服务器配置拒绝客户端”,尽管允许访问目录(vhost配置),大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
在线寻找解决方案我发现很多关于目录访问的帖子(允许所有人等),但据我所知,我已经做到了.在httpd-vhosts.conf中有以下代码:
NameVirtualHost *:80 <VirtualHost *:80> ServerAdmin webmaster@dummy-host.example.com DocumentRoot "/opt/lampp/htdocs/" ServerName localhost ServerAlias localhost ErrorLog "logs/dummy-host.example.com-error_log" CustomLog "logs/dummy-host.example.com-access_log" common </VirtualHost> <VirtualHost *:80> ServerAdmin webmaster@localhost DocumentRoot "/home/remix/" ServerName testproject ServerAlias testproject <Directory "/home/remix/"> Options Indexes FollowSymLinks Includes ExecCGI AllowOverride All Order allow,deny Allow from all </Directory> </VirtualHost>
我还补充道
127.0.0.1 testproject
到/ etc / hosts文件.
此外,/ home / remix /文件夹包含一个index.html文件,并在httpd.conf中启用了vhost.
有什么我没看到的吗?
编辑:这是Apache error_log条目:
[Sat Aug 18 09:15:32.666938 2012] [authz_core:error] [pid 6587] [client 127.0.0.1:38873] AH01630: client denied by server configuration: /home/remix/
<Directory /home/remix/> #... Order allow,deny Allow from all </Directory>
…到Apache 2.4版本相同.
<Directory /home/remix/> #... require all granted </Directory>
查看upgrading overview document以获取有关您可能需要进行的其他更改的信息 – 请注意,您在Google(以及本网站)上找到的大多数配置示例和帮助都是指2.2.
以上是大佬教程为你收集整理的linux – Apache“服务器配置拒绝客户端”,尽管允许访问目录(vhost配置)全部内容,希望文章能够帮你解决linux – Apache“服务器配置拒绝客户端”,尽管允许访问目录(vhost配置)所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。