瀏覽代碼

nginx disable_symlinks fix

Serghey Rodin 12 年之前
父節點
當前提交
0f7ea97e12
共有 2 個文件被更改,包括 2 次插入4 次删除
  1. 0 4
      install/0.9.7/rhel/nginx.conf
  2. 2 0
      install/0.9.7/rhel/templates/web/nginx/default.tpl

+ 0 - 4
install/0.9.7/rhel/nginx.conf

@@ -55,10 +55,6 @@ http {
     gzip_proxied        any;
     gzip_proxied        any;
 
 
 
 
-    # Symlinks protection
-    disable_symlinks    if_not_owner;
-
-
     # Proxy settings
     # Proxy settings
     proxy_redirect      off;
     proxy_redirect      off;
     proxy_set_header    Host            $host;
     proxy_set_header    Host            $host;

+ 2 - 0
install/0.9.7/rhel/templates/web/nginx/default.tpl

@@ -28,6 +28,8 @@ server {
     location ~ /\.hg/   {return 404;}
     location ~ /\.hg/   {return 404;}
     location ~ /\.bzr/  {return 404;}
     location ~ /\.bzr/  {return 404;}
 
 
+    disable_symlinks if_not_owner from=%docroot%;
+
     include %home%/%user%/conf/web/nginx.%domain%.conf*;
     include %home%/%user%/conf/web/nginx.%domain%.conf*;
 }
 }