From a546cc4d591ec06b64d93cdbcd78f2df9d29ce17 Mon Sep 17 00:00:00 2001 From: Martin Mahner Date: Fri, 12 Dec 2014 19:16:51 +0000 Subject: [PATCH] Further nginx improvements --- server/nginx.conf | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/server/nginx.conf b/server/nginx.conf index 26954e1..1dcd017 100644 --- a/server/nginx.conf +++ b/server/nginx.conf @@ -12,7 +12,10 @@ log_format combined_port '$remote_addr - $remote_user [$time_local] ' # ----------------------------------------------------------------------------- server { listen 80; - server_name ~(www\.)?dpaste\.(de|org); + server_name dpaste.de + www.dpaste.de + dpaste.org + www.dpaste.org; location / { rewrite ^ https://$server_name$request_uri? permanent; @@ -24,7 +27,7 @@ server { # ----------------------------------------------------------------------------- server { - listen 443 ssl; + listen 443 ssl spdy; server_name dpaste.org www.dpaste.org; ssl_certificate /srv/dpaste.de/var/ssl/dpaste_org_unified.crt; @@ -38,7 +41,7 @@ server { } server { - listen 443 ssl; + listen 443 ssl spdy; server_name dpaste.de www.dpaste.de; ssl_certificate /srv/dpaste.de/var/ssl/dpaste_de_unified.crt; @@ -59,7 +62,7 @@ server { error_log /srv/dpaste.de/var/nginx.error.log; keepalive_timeout 5; - client_max_body_size 4G; + client_max_body_size 2M; location /media/ { alias /srv/dpaste.de/var/media/; @@ -74,10 +77,8 @@ server { proxy_set_header Host $http_host; proxy_redirect off; proxy_buffering off; - if (!-f $request_filename) { - proxy_pass http://app_server; - break; - } + proxy_pass http://app_server; + break; } }