]> 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 16:44:17 +0000 (17:44 +0100)
docker-compose.yml
etc/nginx/conf.d/default.conf
etc/nginx/htpasswd [new file with mode: 0644]
lib/mezzanine
lib/mezzanine-agenda

index 0e4d59169e5489ab4c0d3b8f20e5cf2476e3f6a7..b7b1bccdc4b05926519d3d85446e91e419073b1c 100644 (file)
@@ -65,6 +65,7 @@ nginx:
     - "8021: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 9fca538ba0689cc62d1f3a990be89c4e3a79ac56..ea325b5248cc75fa461d1795071798584d194d9d 100644 (file)
@@ -1,32 +1,40 @@
 server_tokens off;
 
+#server {
+#    listen 80;
+#    server_name starts.eu;
+#    return 301 $scheme://www.starts.eu$request_uri;
+#}
+
 server {
-       listen 80;
-       charset utf-8;
-
-       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 51cf69d973848f08bc482022fd5bdac9a41f8ff9..adaeaedd970fcd8d4a26fa94605c721ae163271f 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 51cf69d973848f08bc482022fd5bdac9a41f8ff9
+Subproject commit adaeaedd970fcd8d4a26fa94605c721ae163271f
index 2b2de20c2ecbe6b7a5a56eb30c8ccb942eba434c..036a5c7e7bd4f744c1cf36fc332fd3ce3f9c9aa7 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 2b2de20c2ecbe6b7a5a56eb30c8ccb942eba434c
+Subproject commit 036a5c7e7bd4f744c1cf36fc332fd3ce3f9c9aa7