Ubuntu16.04默认apt-getinstallapache2安装的apache2.4
apache2.4配置根目录文件在
/etc/apache2/sites-available/000-default.conf
默认是var/www/html
apache2.4配置根目录文件在
/etc/apache2/sites-available/000-default.conf
默认是var/www/html
可以改成想要的目录,比如/home/judge/etc/web
默认主页的配置在
/etc/apache2/mods-available/dir.conf
可以为如下格式:index.htmlindex.cgiindex.plindex.PHPindex.xhtmlindex.htm
可以修改为***.html等
默认主页的配置在
/etc/apache2/mods-available/dir.conf
可以为如下格式:index.htmlindex.cgiindex.plindex.PHPindex.xhtmlindex.htm
可以修改为***.html等
2017.8.3更新:
AH00558: apache2: Could not reliably determine the server's fully qualified domain name,using 172.19.158.209. Set the 'ServerName' directive globally to suppress this message
以及
访问localhost:80 报 404 You don't have permission to access / on this server.
解决办法:
在/etc/apache2目录下,打开apache2.conf文件,加一句:ServerName localhost:80
第二个问题:
还是apache2.conf文件,找到
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
allow from all
#Require all denied
</Directory>
Options FollowSymLinks
AllowOverride None
Order deny,allow
allow from all
#Require all denied
</Directory>
把Require all denied这一句注释掉,加上allow from all
最后重启apache,发现已经正常了。
参考http://httpd.apache.org/docs/2.4/
原文地址:https://www.jb51.cc/ubuntu/354912.html
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。