Преглед на файлове

[nginx] simplify the root specification for sendfile (#121)

Signed-off-by: Jakob Ackermann <das7pad@outlook.com>
Jakob Ackermann преди 6 години
родител
ревизия
991cb29d0b
променени са 1 файла, в които са добавени 2 реда и са изтрити 5 реда
  1. 2 5
      server-ce/nginx/sharelatex.conf

+ 2 - 5
server-ce/nginx/sharelatex.conf

@@ -2,7 +2,7 @@ server {
 	listen         80;
 	listen         80;
 	server_name    _; # Catch all, see http://nginx.org/en/docs/http/server_names.html
 	server_name    _; # Catch all, see http://nginx.org/en/docs/http/server_names.html
 
 
-	set $static_path /var/www/sharelatex/web/public;
+	root /var/www/sharelatex/web/public/;
 
 
 	location / {
 	location / {
 		proxy_pass http://127.0.0.1:3000;
 		proxy_pass http://127.0.0.1:3000;
@@ -14,7 +14,7 @@ server {
 		proxy_read_timeout 3m;
 		proxy_read_timeout 3m;
 		proxy_send_timeout 3m;
 		proxy_send_timeout 3m;
 	}
 	}
-	
+
 	location /socket.io {
 	location /socket.io {
 		proxy_pass http://127.0.0.1:3026;
 		proxy_pass http://127.0.0.1:3026;
 		proxy_http_version 1.1;
 		proxy_http_version 1.1;
@@ -29,16 +29,13 @@ server {
 
 
 	location /stylesheets {
 	location /stylesheets {
 		expires 1y;
 		expires 1y;
-		root $static_path/;
 	}
 	}
 
 
 	location /minjs {
 	location /minjs {
 		expires 1y;
 		expires 1y;
-		root $static_path/;
 	}
 	}
 
 
 	location /img {
 	location /img {
 		expires 1y;
 		expires 1y;
-		root $static_path/;
 	}
 	}
 }
 }