【发布时间】:2018-05-19 21:59:49
【问题描述】:
我的 httpd.conf 文件(vi /etc/httpd/conf.d/example.com.conf)
<VirtualHost *:80>
ServerName example.com
DocumentRoot /var/www/snipe-it/public
<Directory /var/www/snipe-it/public>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
</VirtualHost>
我的主机文件(/etc/hosts):
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 example.com
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 example.com
当我运行 apachectl configtest 它给了我
AH00558:httpd:无法可靠地确定服务器的完全 限定域名,使用 localhost.localdomain。设置 'ServerName' 指令全局禁止此消息
我正在尝试本地测试 example.com 是否可以在浏览器中显示但它不能(找不到页面),上述错误是否影响它?我如何解决错误,我哪里出错了?我知道它必须是一个 FQDN,但它必须是一个实际的域,或者我们可以弥补一个只是为了测试?
【问题讨论】: