Apache2 config problem

Posted by Hellnar on Server Fault See other posts from Server Fault or by Hellnar
Published on 2010-05-29T09:31:19Z Indexed on 2010/05/29 9:33 UTC
Read the original article Hit count: 602

Filed under:
|
|

For using my Debian VPS for multiple domains , I did such actions:

removed the default one from sites-enabled/ and sites-available/ (config and the symbolic link) and I added this under sites-available/www.mysite.com :

<VirtualHost MYIP:80>
ServerName mysite.com
ServerAlias www.mysite.com
Alias /media/ /home/myuser/mysite/media/
Alias /admin_media/ /home/myuser/django/Django-1.2/django/contrib/admin/media/
WSGIScriptAlias / /home/myuser/mysite/wsgi.py
ErrorLog  /home/myuser/mysite/logs/error.log
CustomLog /home/myuser/mysite/logs/access.log combined
</VirtualHost>

And I have changed my ports.conf to:

NameVirtualHost MYIP:80
Listen 80

<IfModule mod_ssl.c>
    # SSL name based virtual hosts are not yet supported, therefore no
    # NameVirtualHost statement here
    Listen 443
</IfModule>

Lastly I enabled the new domain via the command:

a2ensite www.mysite.com

After restart I get this error:

myuser:~# /etc/init.d/apache2 restart
Restarting web server: apache2apache2: Syntax error on line 281 of /etc/apache2/apache2.conf: Syntax error on line 1 of /etc/apache2/sites-enabled/www.birertek.com: /etc/apache2/sites-enabled/www.birertek.com:1: <VirtualHost> was not closed.
 failed!

Please help this poor soul.

© Server Fault or respective owner

Related posts about apache

Related posts about apache2