Working htaccess

This commit is contained in:
Alexandre Iooss 2020-02-09 21:47:24 +01:00
parent 47bf025145
commit a52c9f5cb3
No known key found for this signature in database
GPG Key ID: 6C79278F3FCDCC02
1 changed files with 7 additions and 1 deletions

View File

@ -68,8 +68,14 @@ Pour reverse-proxyfier le serveur derrière Apache, on place dans `~/www/.htacce
```apache
RewriteEngine On
# UWSGI socket
RewriteRule ^django.wsgi/(.*)$ unix:/home/c/club-med/django-med/uwsgi.sock|fcgi://localhost/ [P,NE,L]
# When not a file and not starting with django.wsgi, then forward to UWSGI
RewriteCond %{REQUEST_URI} !^/django.wsgi/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ unix:/home/c/club-med/django-med/uwsgi.sock|fcgi://localhost [P,NE,QSA,L]
RewriteRule ^(.*)$ /django.wsgi/$1 [QSA,L]
```
Pour servir les fichiers statiques, on crée un lien symbolique :