From 76cd3ead2ac0c18447e53b43485c7d9c741b4385 Mon Sep 17 00:00:00 2001 From: monotek Date: Wed, 19 Mar 2014 11:15:34 +0100 Subject: [PATCH 1/3] Create nginx-zammad.conf new nginx conf without upstream --- contrib/nginx-zammad.conf | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 contrib/nginx-zammad.conf diff --git a/contrib/nginx-zammad.conf b/contrib/nginx-zammad.conf new file mode 100644 index 000000000..a3ef60ec0 --- /dev/null +++ b/contrib/nginx-zammad.conf @@ -0,0 +1,31 @@ +# +# this is the nginx config for zammad +# 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) +# + +server { + 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; + + location ~ ^/(assets/|robots.txt|humans.txt|favicon.ico) { + expires max; + } + + location /ws { + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "Upgrade"; + proxy_pass http://localhost:6042; + } + + location / { + proxy_set_header Host $host; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_pass http://localhost:3000; + } +} From a0cb9dcb711aeb90780e9b52dbffd693cdf09c2b Mon Sep 17 00:00:00 2001 From: monotek Date: Wed, 19 Mar 2014 11:16:58 +0100 Subject: [PATCH 2/3] Update nginx-zammad.conf fix whitspace --- contrib/nginx-zammad.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/nginx-zammad.conf b/contrib/nginx-zammad.conf index a3ef60ec0..26da690b0 100644 --- a/contrib/nginx-zammad.conf +++ b/contrib/nginx-zammad.conf @@ -26,6 +26,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; } } From 07f14f2ffd2f8659cc03497f32ff70dd50a312d4 Mon Sep 17 00:00:00 2001 From: monotek Date: Wed, 19 Mar 2014 11:22:55 +0100 Subject: [PATCH 3/3] Update zammad.conf fixing whitspaces (again)... --- contrib/nginx/sites-enabled/zammad.conf | 44 ++++++++++++++----------- 1 file changed, 24 insertions(+), 20 deletions(-) diff --git a/contrib/nginx/sites-enabled/zammad.conf b/contrib/nginx/sites-enabled/zammad.conf index cdf27e10e..5be122287 100644 --- a/contrib/nginx/sites-enabled/zammad.conf +++ b/contrib/nginx/sites-enabled/zammad.conf @@ -1,26 +1,30 @@ +# +# this is the nginx config for zammad +# link this file in your sites-enabled via symlink (ln -s nginx-zammad.conf /etc/nginx/sites-enabled/zammad.conf) +# server { - listen 80; - server_name localhost; - root /path_/to_/zammad; + listen 80; + server_name your.domain.org; + root /opt/zammad/public; - 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; - } + access_log /var/log/nginx/zammad.access.log; + error_log /var/log/nginx/zammad.error.log; - location ~ ^/(assets/|robots.txt|humans.txt|favicon.ico) { - root /path_/to_/zammad/public; - access_log off; - expires max; - } + location ~ ^/(assets/|robots.txt|humans.txt|favicon.ico) { + expires max; + } - location / { - proxy_pass http://localhost:9292; - proxy_set_header Host $host; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - } + location /ws { + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "Upgrade"; + proxy_pass http://localhost:6042; + } + + location / { + proxy_set_header Host $host; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_pass http://localhost:3000; + } }