如果你的网站做了301永久重定向,在访问不带www的顶级域名的时候例如xiaotiejiang.com报出403错误的话(这个时侯一般会跳转到apache的欢迎页面),而且你在使用[shell]
/etc/init.d/httpd restart[/shell]
这个命令进行apache的重启时,会报出如下错误:[shell]
httpd: Could not reliably determine the server’s fully qualified domain name[/shell]
这个时侯可以修改这个文件[shell]
vim /etc/httpd/conf/httpd.conf[/shell]
将其中的#ServerName localhost:80注释去掉。
附:这个错误可能是你修改过hostname造成的。
2023年五月 一 二 三 四 五 六 日 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 -
近期文章