From ff74c847e9744ec00660c332ac2a36664bf014ab Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Thu, 24 Apr 2014 18:25:26 +0200 Subject: [PATCH] Moved client_max_body_size to right position. --- contrib/nginx-zammad.conf | 6 ++-- contrib/nginx/sites-enabled/zammad.conf | 42 +++++++++++++------------ 2 files changed, 26 insertions(+), 22 deletions(-) diff --git a/contrib/nginx-zammad.conf b/contrib/nginx-zammad.conf index 26da690b0..41714c42c 100644 --- a/contrib/nginx-zammad.conf +++ b/contrib/nginx-zammad.conf @@ -1,6 +1,6 @@ # # this is the nginx config for zammad -# link this file in your /etc/nginx/sites-enabled via symlink +# link this file in your /etc/nginx/sites-enabled via symlink # (ln -s /opt/zammad/contrib/nginx-zammad.conf /etc/nginx/sites-enabled/zammad.conf) # @@ -12,6 +12,8 @@ server { access_log /var/log/nginx/zammad.access.log; error_log /var/log/nginx/zammad.error.log; + client_max_body_size 50M; + location ~ ^/(assets/|robots.txt|humans.txt|favicon.ico) { expires max; } @@ -26,6 +28,6 @@ server { location / { proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_pass http://localhost:3000; + proxy_pass http://localhost:3000; } } diff --git a/contrib/nginx/sites-enabled/zammad.conf b/contrib/nginx/sites-enabled/zammad.conf index 7fc5d08ba..c9e3f04b3 100644 --- a/contrib/nginx/sites-enabled/zammad.conf +++ b/contrib/nginx/sites-enabled/zammad.conf @@ -4,28 +4,30 @@ # server { - listen 80; - server_name your.domain.org; - root /opt/zammad/public; + listen 80; + server_name your.domain.org; + root /opt/zammad/public; - access_log /var/log/nginx/zammad.access.log; - error_log /var/log/nginx/zammad.error.log; + access_log /var/log/nginx/zammad.access.log; + error_log /var/log/nginx/zammad.error.log; - location ~ ^/(assets/|robots.txt|humans.txt|favicon.ico) { - expires max; - } + client_max_body_size 50M; - location /ws { - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "Upgrade"; - proxy_pass http://localhost:6042; - proxy_read_timeout 86400; - } + location ~ ^/(assets/|robots.txt|humans.txt|favicon.ico) { + expires max; + } - location / { - proxy_set_header Host $host; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_pass http://localhost:3000; - } + location /ws { + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "Upgrade"; + proxy_pass http://localhost:6042; + proxy_read_timeout 86400; + } + + location / { + proxy_set_header Host $host; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_pass http://localhost:3000; + } }