Commits

Mikhail Korobov committed 1721b40

improved nginx config: remove 1.2-specific admin static handling, add useful (commented out) snippet

  • Participants
  • Parent commits 46fb0d8

Comments (0)

Files changed (1)

File fab_deploy/config_templates/nginx.config

         expires 1M;
     }
 
-    # admin media serving
-    # (this location is available if django is installed from svn)
-    location /media {
-        root {{ ENV_DIR }}/src/django/django/contrib/admin;
-        expires 10m;
-        autoindex off;
-    }
-
-    # alternative django admin media path
-#    location /static/admin {
-#        root {{ PROJECT_DIR }};
-#        autoindex off;
-#        expires 10m;
-#    }
-
     #error_page  404  /404.html;
 
     # redirect server error pages to the static page /50x.html
     server_name www.{{ SERVER_NAME }};
     rewrite ^(.*)$ http://{{ SERVER_NAME }}$1 permanent;
 }
+
+# uncomment the following in order to deny all requests with unmatched server_name;
+# for nginx >= 0.8.21 replace 'default' with 'default_server'
+
+# server {
+#     listen       80  default;
+#     server_name  _;
+#     return       444;
+# }