Question

I am trying to give a Domain name and run multiple django projects on my apache

<VirtualHost first.site.com:80>
     ServerName first.site.com
     WSGIDaemonProcess first
     WSGIScriptAlias / /opt/project/first/first/wsgi.py process-group=first application-group=%{GLOBAL}
    ErrorLog ${APACHE_LOG_DIR}/error.log
    <Directory /opt/project/first/first>
    Order allow,deny
    Allow from all
    </Directory>
</VirtualHost>

<VirtualHost second.site.com:80>
     ServerName second.site.com
     WSGIDaemonProcess second
     WSGIScriptAlias / /opt/project/second/second/wsgi.py process-group=second application-group=%{GLOBAL}
    ErrorLog ${APACHE_LOG_DIR}/error.log
    <Directory /opt/project/second/second>
    Order allow,deny
    Allow from all
    </Directory>
</VirtualHost>

but, second website don't work.

 You don't have permission to access / on this server.

Any advice is much appreciated.

Thanks

Was it helpful?

Solution 2

Updating Virtual Host Settings from Apache 2.2 to Apache 2.4

Apache 2.2

Order allow,deny
Allow from all

Apache 2.4

Require all granted

OTHER TIPS

Are all directories from / down to the directory where the WSGI script files are readable to the Apache user? That is the main reason why you get this error.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top