My django server setup for future reference, because it’s too easy to forget exactly who’s talking to what file in 2 months.
Will put nginx front end proxy soon.
- Apache listens on port 80
- Port 80 is a VHOST in sites-available / apache2.conf
- Apache Vhost points to WSGI Script in /srv/anuva/_project/apache/django.wsgi
- WSGI Script adds anuva project to PYTHONPATH
- WSGI Script defines which anuva.settings as project, and django’s WSGIHandler processes the request.
- Apache displays request.
Things I’ve done this time for better management:
The project itself is now in a folder called anuva_project, alongside a logs folder, and apache folder.
I can now add all project specific things in one folder instead of everywhere. Logs are easily accessible instead of at /var/log/apache2/site .
I can add a directory for site specific python packages by adding the directory to the pythonpath in the WSGI script.