2016-09-12 16:49:37 +02:00
|
|
|
<VirtualHost *:80>
|
|
|
|
ServerName default
|
|
|
|
DocumentRoot /var/www/html
|
|
|
|
|
|
|
|
ProxyPreserveHost On
|
|
|
|
ProxyRequests Off
|
|
|
|
ProxyPass /static/ !
|
|
|
|
ProxyPass /media/ !
|
2016-11-06 01:36:10 +01:00
|
|
|
# Pour utiliser un sous-dossier (typiquement /gestion/), il faut faire a la
|
|
|
|
# place des lignes suivantes:
|
|
|
|
#
|
|
|
|
# RequestHeader set Daphne-Root-Path /gestion
|
2017-01-05 15:52:25 +01:00
|
|
|
# ProxyPass /gestion/ws/ ws://127.0.0.1:8001/ws/
|
2016-11-06 01:36:10 +01:00
|
|
|
# ProxyPass /gestion http://127.0.0.1:8001/gestion
|
|
|
|
# ProxyPassReverse /gestion http://127.0.0.1:8001/gestion
|
|
|
|
#
|
|
|
|
# Penser egalement a changer les /static/ et /media/ dans la config apache
|
|
|
|
# ainsi que dans les settings django.
|
2016-09-12 17:04:50 +02:00
|
|
|
ProxyPass /ws/ ws://127.0.0.1:8001/ws/
|
|
|
|
ProxyPass / http://127.0.0.1:8001/
|
|
|
|
ProxyPassReverse / http://127.0.0.1:8001/
|
2016-09-12 16:49:37 +02:00
|
|
|
|
|
|
|
Alias /media /vagrant/media
|
|
|
|
Alias /static /var/www/static
|
|
|
|
<Directory /vagrant/media>
|
|
|
|
Order deny,allow
|
|
|
|
Allow from all
|
|
|
|
</Directory>
|
|
|
|
<Directory /var/www/static>
|
|
|
|
Order deny,allow
|
|
|
|
Allow from all
|
|
|
|
</Directory>
|
|
|
|
|
|
|
|
ErrorLog ${APACHE_LOG_DIR}/error.log
|
|
|
|
CustomLog ${APACHE_LOG_DIR}/access.log combined
|
|
|
|
|
|
|
|
</VirtualHost>
|
|
|
|
|
|
|
|
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
|