I have a wordpress (/var/www/cb
), which I wish to run as root (www.cb.com
) and one Django app (/vc/cb/cb
) as a subdirectory (cb.com/launch
).
<IfModule mod_ssl.c>
<VirtualHost _default_:443>
ServerAdmin info@cb.com
ServerName cb.com
DocumentRoot /var/www/cb
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/cb>
Options Indexes FollowSymLinks MultiViews
AllowOverride FileInfo Indexes
Order allow,deny
allow from all
</Directory>
WSGIScriptAlias /launch /vc/cb/cb/wsgi.py
<Directory "/vc/cb/cb">
<Files wsgi.py>
Order deny,allow
Allow from all
</Files>
</Directory>
</VirtualHost>
</IfModule>
A similar question has been asked here, however that was pre-Django-1.4, where you had to create your wsgi file manually.
In the documentation it says the wsgi.py is created automatically for you. The main difference I see is the file extension, in the link above they refer to the wsgi file as xx.wsgi while django 1.4 documentation points to wsgi.py. I don't know if this is an issue, but I get a 404 when I do a https://cb.com/launch
The content of wsgi.py:
import os
import sys
sys.path.append('/vc/cb')
sys.path.append('/vc/cb/cb')
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "cb.settings")
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()
What am I missing?