Django: Difference between revisions

From lippmann wiki
Jump to navigation Jump to search
(Created page with "==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 i...")
 
Line 3: Line 3:
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.
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>
<VirtualHost *:8080>
 
ServerName sdprod.hq.netapp.com
ServerName sdprod.hq.netapp.com
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/
 
<Directory /var/django/static>
<Directory /var/django/static>
Require all granted
Require all granted
</Directory>
</Directory>
 
<Directory /var/django/media>
<Directory /var/django/media>
Require all granted
Require all granted
</Directory>
</Directory>
 
  WSGIDaemonProcess zealot python-path=/var/django:/usr/lib/python3.4
  WSGIDaemonProcess zealot python-path=/var/django:/usr/lib/python3.4
  WSGIProcessGroup zealot
  WSGIProcessGroup zealot
  WSGIScriptAlias / /var/django/zealot/wsgi.py
  WSGIScriptAlias / /var/django/zealot/wsgi.py
 
  <Directory /var/django/zealot/>
  <Directory /var/django/zealot/>
  <Files wsgi.py>
  <Files wsgi.py>
Line 26: Line 26:
  </Files>
  </Files>
  </Directory>
  </Directory>
 
</VirtualHost>
</VirtualHost>

Revision as of 22:17, 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 sdprod.hq.netapp.com
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>