From a52c9f5cb30310ddb4ddf219757ad994dc392e55 Mon Sep 17 00:00:00 2001 From: Alexandre Iooss Date: Sun, 9 Feb 2020 21:47:24 +0100 Subject: [PATCH] Working htaccess --- README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ed2afdf..6e08f0c 100644 --- a/README.md +++ b/README.md @@ -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 :