Saturday, May 4, 2024
4
rated 0 times [  4] [ 0]  / answers: 1 / hits: 26041  / 3 Years ago, sat, october 2, 2021, 5:44:45

I'm trying to configure Apache2 with Django and mod_wsgi on a virtual host.



I wrote a simple configuration file:



<VirtualHost: *.80>

ServerName gpx
ServerAlias gpx.gpsfte
DocumentRoot /var/www/gpx/htdocs

WSGIScriptAlias / /var/django/gpx/wsgi/mainapp.wsgi

</VirtualHost>


But when I reload Apache I get this error:



# service apache2 reload
apache2: Syntax error on line 237 of /etc/apache2/apache2.conf: Syntax error on line 9 of /etc/apache2/sites-enabled/gpx: Expected </VirtualHost:> but saw </VirtualHost>
Action 'configtest' failed.
The Apache error log may have more information.
...fail!


I'm really lost, what does it mean with </VirtualHost:>?
Thanks for any help you can give me.


More From » configuration

 Answers
1

The problem looks like it is with the way you've opened the section: the ending tag that matches <VirtualHost: ...> is </VirtualHost:>, as the error indicates.



Presumably you meant to open the section with the following instead:



<VirtualHost *:80>


(note that there is no colon after VirtualHost)


[#36779] Sunday, October 3, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ovierman

Total Points: 445
Total Questions: 108
Total Answers: 111

Location: Libya
Member since Fri, Oct 30, 2020
4 Years ago
;