Merge branch 'master' of https://github.com/szmoore/MCTX3420.git
[matches/MCTX3420.git] / testing / fastcgi-approach / -etc-nginx / sites-enabled / default
index b11b2e4..541f6d1 100644 (file)
@@ -35,14 +35,6 @@ server {
                # include /etc/nginx/naxsi.rules
        }
 
-       location /doc/ {
-               alias /usr/share/doc/;
-               autoindex on;
-               allow 127.0.0.1;
-               allow ::1;
-               deny all;
-       }
-
        # Only for nginx-naxsi used with nginx-naxsi-ui : process denied requests
        #location /RequestDenied {
        #       proxy_pass http://127.0.0.1:8080;    
@@ -77,12 +69,25 @@ server {
        location ~ /\.ht {
                deny all;
        }
-
-        location ~ ^/api/?([^?]*) {
-                fastcgi_pass 127.0.0.1:9005;
-                fastcgi_param DOCUMENT_URI_LOCAL $1;
-                include fastcgi_params;
-        }
+       
+       #Login area
+       location ^~ /api/login {
+               auth_basic "Restricted Access";
+               auth_basic_user_file /usr/share/nginx/access/.htpasswd;
+       
+               fastcgi_pass 127.0.0.1:9005;
+               fastcgi_param DOCUMENT_URI_LOCAL login;
+               include fastcgi_params;
+       }
+       
+       #MCTX API
+       location /api {
+               location ~ ^/api/?([^?]*) {
+                       fastcgi_pass 127.0.0.1:9005;
+                       fastcgi_param DOCUMENT_URI_LOCAL $1;
+                       include fastcgi_params;
+               }
+       }
 }
 
 

UCC git Repository :: git.ucc.asn.au