]> git.parisson.com Git - mezzo.git/commitdiff
Add nginx optional htpasswd access
authorGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Thu, 23 Mar 2017 16:44:17 +0000 (17:44 +0100)
committerGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Thu, 23 Mar 2017 17:06:27 +0000 (18:06 +0100)
docker-compose.yml
etc/nginx/conf.d/default.conf
etc/nginx/htpasswd [new file with mode: 0644]
lib/mezzanine
lib/mezzanine-agenda

index ea4508d8c01b6a3c852bb03a300e9403c8af2b88..10569c1da8ced9a163ea44901b750294cf4c4a7c 100644 (file)
@@ -68,6 +68,7 @@ nginx:
     - "8022:80"
   volumes:
     - ./etc/nginx/conf.d/default.conf:/etc/nginx/conf.d/default.conf
+    - ./etc/nginx/htpasswd:/etc/nginx/htpasswd
   volumes_from:
     - var
   links:
index 1ec0872896b2fb3c2c357d52814d0add6851a5b2..ea325b5248cc75fa461d1795071798584d194d9d 100644 (file)
@@ -1,39 +1,40 @@
 server_tokens off;
 
-server {
-    listen 80;
-    server_name starts.eu;
-    return 301 $scheme://www.starts.eu$request_uri;
-}
+#server {
+#    listen 80;
+#    server_name starts.eu;
+#    return 301 $scheme://www.starts.eu$request_uri;
+#}
 
 server {
-       listen 80;
-       charset utf-8;
-       server_name *.starts.eu vertigo.*;
-
-       access_log /var/log/nginx/app-access.log;
-       error_log /var/log/nginx/app-error.log;
-
-       # max upload size
-       client_max_body_size 4096M; # adjust to taste
-
-       # Django media
-       location /media/ {
-                       alias /srv/media/; # your Django project's media files - amend as required
-       }
-
-       # Django static
-       location /static/ {
-               alias /srv/static/; # your Django project's static files - amend as required
-       }
-
-       # Django static
-       location /doc/ {
-               alias /srv/doc/build/html/; # your Django project's static files - amend as required
-       }
-
-       location / {
-            uwsgi_pass app:8000;
-            include /etc/nginx/uwsgi_params;
-       }
+    listen 80;
+    charset utf-8;
+    server_name _;
+
+    access_log /var/log/nginx/app-access.log;
+    error_log /var/log/nginx/app-error.log;
+
+    # max upload size
+    client_max_body_size 4096M;
+
+    # Django media
+    location /media/ {
+        alias /srv/media/;
+    }
+
+    # Django static
+    location /static/ {
+        alias /srv/static/;
+    }
+
+    # Django static
+    location /doc/ {
+        alias /srv/doc/build/html/;
+    }
+
+    location / {
+       uwsgi_pass app:8000;
+       include /etc/nginx/uwsgi_params;
+       #auth_basic_user_file /etc/nginx/htpasswd;
+    }
 }
diff --git a/etc/nginx/htpasswd b/etc/nginx/htpasswd
new file mode 100644 (file)
index 0000000..48d6e8a
--- /dev/null
@@ -0,0 +1 @@
+mezzorg:$apr1$EpiFKm0X$R0glyFNEjKEcO/4AUGtWv0
index 36b6bffac40111c37fd3f0ef435ffc3f79f93793..adaeaedd970fcd8d4a26fa94605c721ae163271f 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 36b6bffac40111c37fd3f0ef435ffc3f79f93793
+Subproject commit adaeaedd970fcd8d4a26fa94605c721ae163271f
index fc5d200fbb5c8ef1a6058a78c8a80ae34658cfa4..036a5c7e7bd4f744c1cf36fc332fd3ce3f9c9aa7 160000 (submodule)
@@ -1 +1 @@
-Subproject commit fc5d200fbb5c8ef1a6058a78c8a80ae34658cfa4
+Subproject commit 036a5c7e7bd4f744c1cf36fc332fd3ce3f9c9aa7