[root@slave ~]# /usr/local/apache2/bin/apachectl -t
httpd: Syntax error on line 400 of /usr/local/apache2/conf/httpd.conf: Syntax error on line 27 of /usr/local/apache2/conf/extra/httpd-vhosts.conf: /usr/local/apache2/conf/extra/httpd-vhosts.conf:40: <> was not closed.\n/usr/local/apache2/conf/extra/httpd-vhosts.conf:39: <> was not closed.\n/usr/local/apache2/conf/extra/httpd-vhosts.conf:33: <> was not closed.\n/usr/local/apache2/conf/extra/httpd-vhosts.conf:27: <VirtualHost> was not closed.
错误1:
[root@slave ~]# vim /usr/local/apache2/conf/httpd.conf
396 # Real-time info on requests and configuration
397 #Include conf/extra/httpd-info.conf
398
399 # Virtual hosts
400 Include conf/extra/httpd-vhosts.conf
401
402 # Local access to the Apache HTTP Server Manual
403 #Include conf/extra/httpd-manual.conf
错误2:
[root@slave ~]# vim /usr/local/apache2/conf/extra/httpd-vhosts.conf
22 # VirtualHost example:
23 # Almost any Apache directive may go into a VirtualHost container.
24 # The first VirtualHost section is used for all requests that do not
25 # match a ServerName or ServerAlias in any <VirtualHost> block.
26 #
27 <VirtualHost *:80>
28 DocumentRoot "/data/www"
29 ServerName www.test.com
30 ServerAlias www.aaa.com
31 # ErrorLog "logs/dummy-host.example.com-error_log"
32 # CustomLog "logs/dummy-host.example.com-access_log" common
33 < Directory /data/www/abc/>
34 allowoverride AuthConfig
以上报错提示第400行和第27行有语法错误,没有看出来哪里出错?
编辑回复