Apache2:期待<!---->但是看到了

时间:2013-03-09 19:22:13

标签: configuration apache2 webmin

Syntax error on line 14 of /etc/apache2/sites-enabled/mysite.org.conf: Expected </> but saw </VirtualHost>
Action 'start' failed.
The Apache error log may have more information.

和/etc/apache2/sites-enabled/mysitet.org.conf:

<VirtualHost *:80>
ServerName mysite.org
DocumentRoot /var/www/mysite_org

< Directory /var/www/mysite_org >
    Order allow,deny
    Allow from all
< /Directory >

WSGIDaemonProcess mysite_org processes=2 threads=15 display-name=%{GROUP}
WSGIProcessGroup mysite_org

WSGIScriptAlias / /var/www/mysite_org/apache/django.wsgi
</VirtualHost>

1 个答案:

答案 0 :(得分:4)

此错误实际上是由第5行和第8行引起的。因为标签是用空格打开的,所以配置假设标签是&lt;&gt;并且应该关闭。因为&lt;目录&gt;和&lt; /目录&gt;两者都有空格,它假定你打开&lt;&gt;两次。

只需在标记名称之前删除空格,Apache就应该重启,没有任何问题。

<Directory /var/www/mysite_org>
    Order allow,deny
    Allow from all
</Directory >