Starting httpd: Syntax error on line 993 of /etc/httpd/conf/httpd.conf:
<VirtualHost> directive requires additional arguments
仔细看了一下,原来是
<VirtualHost>
ServerAdmin webmaster@dummy-host.example.com
DocumentRoot /www/docs/dummy-host.example.com
ServerName dummy-host.example.com
ErrorLog logs/dummy-host.example.com-error_log
CustomLog logs/dummy-host.example.com-access_log common
</VirtualHost>
解决方法如下:
NameVirtualHost *:80
然后下面配置虚拟主机设置为:
<VirtualHost *> "这一点不同"
ServerAdmin webmaster@dummy-host.example.com
DocumentRoot /www/docs/dummy-host.example.com
ServerName dummy-host.example.com
ErrorLog logs/dummy-host.example.com-error_log
CustomLog logs/dummy-host.example.com-access_log common
</VirtualHost>
然后运行成功了,如下:
[root@smart ~]# service httpd restart
Stopping httpd: [ OK ]
Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
[Sun Oct 26 23:26:49 2008] [warn] NameVirtualHost *:80 has no VirtualHosts
[ OK ]
没有评论:
发表评论