Django: Difference between revisions

From lippmann wiki
Jump to navigation Jump to search
Line 5: Line 5:
  <VirtualHost *:8080>
  <VirtualHost *:8080>
   
   
  ServerName sdprod.hq.netapp.com
  ServerName fuego.lipmann.us
  Alias /media/ /var/django/media/
  Alias /media/ /var/django/media/
  Alias /static/ /usr/share/python-django-common/django/contrib/admin/static/
  Alias /static/ /usr/share/python-django-common/django/contrib/admin/static/

Revision as of 22:20, 7 June 2015

example apache config

Below apache config works with the debian django repository (specifically, the static alias is on a separate location). Outside of that the django instance zealot is stored in /var/django/zealot.

<VirtualHost *:8080>

ServerName fuego.lipmann.us
Alias /media/ /var/django/media/
Alias /static/ /usr/share/python-django-common/django/contrib/admin/static/

<Directory /var/django/static>
Require all granted
</Directory>

<Directory /var/django/media>
Require all granted
</Directory>

WSGIDaemonProcess zealot python-path=/var/django:/usr/lib/python3.4
WSGIProcessGroup zealot
WSGIScriptAlias / /var/django/zealot/wsgi.py

<Directory /var/django/zealot/>
<Files wsgi.py>
Require all granted
</Files>
</Directory>

</VirtualHost>