From 311a9115d2f775ccd18bca970019f3d1d71f9d62 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Tue, 18 Mar 2014 11:38:30 +0100 Subject: [PATCH] Small improvements. --- contrib/nginx/nginx.conf | 5 ++++- contrib/nginx/sites-enabled/zammad.conf | 15 ++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/contrib/nginx/nginx.conf b/contrib/nginx/nginx.conf index e12d2eebf..d9bd10f65 100644 --- a/contrib/nginx/nginx.conf +++ b/contrib/nginx/nginx.conf @@ -24,9 +24,12 @@ http { #access_log logs/access.log main; + sendfile on; #tcp_nopush on; + client_max_body_size 50M; + #keepalive_timeout 0; keepalive_timeout 65; proxy_cache_path /tmp/nginx/cache/ levels=1:2 keys_zone=one:8m max_size=3000m inactive=600m; @@ -36,7 +39,7 @@ http { gzip_vary on; gzip_min_length 1000; gzip_proxied any; - gzip_types text/plain text/html text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript; + gzip_types text/plain text/html text/css text/xml application/json application/x-javascript application/xml application/xml+rss text/javascript; gzip_buffers 16 8k; server { diff --git a/contrib/nginx/sites-enabled/zammad.conf b/contrib/nginx/sites-enabled/zammad.conf index 9333be645..cdf27e10e 100644 --- a/contrib/nginx/sites-enabled/zammad.conf +++ b/contrib/nginx/sites-enabled/zammad.conf @@ -1,29 +1,26 @@ -upstream zammad { - server localhost:9292; -} server { listen 80; server_name localhost; - root path_/to_/zammad; - + root /path_/to_/zammad; location /ws { proxy_pass http://localhost:6042; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "Upgrade"; + proxy_read_timeout 86400; } location ~ ^/(assets/|robots.txt|humans.txt|favicon.ico) { - root path_/to_/zammad/public; + root /path_/to_/zammad/public; access_log off; expires max; } - + location / { - proxy_pass http://zammad; # match the name of upstream directive which is defined above + proxy_pass http://localhost:9292; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } -} \ No newline at end of file +}