master
andryyy 2016-12-22 12:20:26 +01:00
parent b6c95e2bd6
commit 184a35da24
2 changed files with 110 additions and 110 deletions

View File

@ -1,18 +1,18 @@
server { server {
listen 8081; listen 8081;
index index.php index.html; index index.php index.html;
server_name _; server_name _;
error_log /var/log/nginx/error.log; error_log /var/log/nginx/error.log;
access_log /var/log/nginx/access.log; access_log /var/log/nginx/access.log;
root /dynmaps; root /dynmaps;
location ~ \.php$ { location ~ \.php$ {
try_files $uri =404; try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass phpfpm:9000; fastcgi_pass phpfpm:9000;
fastcgi_index index.php; fastcgi_index index.php;
include fastcgi_params; include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param PATH_INFO $fastcgi_path_info;
} }
} }

View File

@ -1,107 +1,107 @@
server { server {
listen 443; listen 443;
ssl on; ssl on;
ssl_certificate /etc/ssl/mail/cert.pem; ssl_certificate /etc/ssl/mail/cert.pem;
ssl_certificate_key /etc/ssl/mail/key.pem; ssl_certificate_key /etc/ssl/mail/key.pem;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on; ssl_prefer_server_ciphers on;
ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH"; ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH";
ssl_ecdh_curve secp384r1; ssl_ecdh_curve secp384r1;
add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload"; add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload";
index index.php index.html; index index.php index.html;
server_name _ autodiscover.* autoconfig.*; server_name _ autodiscover.* autoconfig.*;
error_log /var/log/nginx/error.log; error_log /var/log/nginx/error.log;
access_log /var/log/nginx/access.log; access_log /var/log/nginx/access.log;
root /web; root /web;
location ~ \.php$ { location ~ \.php$ {
try_files $uri =404; try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass phpfpm:9000; fastcgi_pass phpfpm:9000;
fastcgi_index index.php; fastcgi_index index.php;
include fastcgi_params; include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param PATH_INFO $fastcgi_path_info;
} }
rewrite ^(/save.+)$ /rspamd$1 last; rewrite ^(/save.+)$ /rspamd$1 last;
location /rspamd/ { location /rspamd/ {
proxy_pass http://rspamd:11334/; proxy_pass http://rspamd:11334/;
proxy_set_header Host $host; proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
add_header Strict-Transport-Security "max-age=31536000; includeSubdomains"; add_header Strict-Transport-Security "max-age=31536000; includeSubdomains";
add_header X-Content-Type-Options nosniff; add_header X-Content-Type-Options nosniff;
add_header X-Frame-Options SAMEORIGIN; add_header X-Frame-Options SAMEORIGIN;
add_header X-XSS-Protection "1; mode=block"; add_header X-XSS-Protection "1; mode=block";
} }
location ^~ /inc/init.sql { location ^~ /inc/init.sql {
deny all; deny all;
} }
if ($host ~* autodiscover\.(.*)) { if ($host ~* autodiscover\.(.*)) {
rewrite ^(.*) /autodiscover.php last; rewrite ^(.*) /autodiscover.php last;
} }
if ($host ~* autoconfig\.(.*)) { if ($host ~* autoconfig\.(.*)) {
rewrite ^(.*) /autoconfig.php last; rewrite ^(.*) /autoconfig.php last;
} }
location ^~ /Microsoft-Server-ActiveSync { location ^~ /Microsoft-Server-ActiveSync {
proxy_pass http://sogo/SOGo/Microsoft-Server-ActiveSync; proxy_pass http://sogo/SOGo/Microsoft-Server-ActiveSync;
proxy_connect_timeout 1000; proxy_connect_timeout 1000;
proxy_next_upstream timeout error; proxy_next_upstream timeout error;
proxy_send_timeout 1000; proxy_send_timeout 1000;
proxy_read_timeout 1000; proxy_read_timeout 1000;
proxy_buffer_size 8k; proxy_buffer_size 8k;
proxy_buffers 4 32k; proxy_buffers 4 32k;
proxy_temp_file_write_size 64k; proxy_temp_file_write_size 64k;
proxy_busy_buffers_size 64k; proxy_busy_buffers_size 64k;
proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host; proxy_set_header Host $host;
proxy_set_header x-webobjects-server-protocol HTTP/1.0; proxy_set_header x-webobjects-server-protocol HTTP/1.0;
proxy_set_header x-webobjects-remote-host $remote_addr; proxy_set_header x-webobjects-remote-host $remote_addr;
proxy_set_header x-webobjects-server-name $server_name; proxy_set_header x-webobjects-server-name $server_name;
proxy_set_header x-webobjects-server-url $scheme://$host; proxy_set_header x-webobjects-server-url $scheme://$host;
proxy_set_header x-webobjects-server-port $server_port; proxy_set_header x-webobjects-server-port $server_port;
client_body_buffer_size 128k; client_body_buffer_size 128k;
client_max_body_size 100m; client_max_body_size 100m;
} }
location ^~ /SOGo { location ^~ /SOGo {
proxy_pass http://sogo:20000; proxy_pass http://sogo:20000;
proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host; proxy_set_header Host $host;
proxy_set_header x-webobjects-server-protocol HTTP/1.0; proxy_set_header x-webobjects-server-protocol HTTP/1.0;
proxy_set_header x-webobjects-remote-host $remote_addr; proxy_set_header x-webobjects-remote-host $remote_addr;
proxy_set_header x-webobjects-server-name $server_name; proxy_set_header x-webobjects-server-name $server_name;
proxy_set_header x-webobjects-server-url $scheme://$host; proxy_set_header x-webobjects-server-url $scheme://$host;
proxy_set_header x-webobjects-server-port $server_port; proxy_set_header x-webobjects-server-port $server_port;
#proxy_connect_timeout 90; #proxy_connect_timeout 90;
#proxy_send_timeout 90; #proxy_send_timeout 90;
#proxy_read_timeout 90; #proxy_read_timeout 90;
#proxy_buffer_size 4k; #proxy_buffer_size 4k;
#proxy_buffers 4 32k; #proxy_buffers 4 32k;
#proxy_busy_buffers_size 64k; #proxy_busy_buffers_size 64k;
#proxy_temp_file_write_size 64k; #proxy_temp_file_write_size 64k;
client_body_buffer_size 128k; client_body_buffer_size 128k;
client_max_body_size 100m; client_max_body_size 100m;
break; break;
} }
location /SOGo.woa/WebServerResources/ { location /SOGo.woa/WebServerResources/ {
alias /usr/lib/GNUstep/SOGo/WebServerResources/; alias /usr/lib/GNUstep/SOGo/WebServerResources/;
allow all; allow all;
} }
location /SOGo/WebServerResources/ { location /SOGo/WebServerResources/ {
alias /usr/lib/GNUstep/SOGo/WebServerResources/; alias /usr/lib/GNUstep/SOGo/WebServerResources/;
allow all; allow all;
} }
location (^/SOGo/so/ControlPanel/Products/[^/]*UI/Resources/.*\.(jpg|png|gif|css|js)$ { location (^/SOGo/so/ControlPanel/Products/[^/]*UI/Resources/.*\.(jpg|png|gif|css|js)$ {
alias /usr/lib/GNUstep/SOGo/$1.SOGo/Resources/$2; alias /usr/lib/GNUstep/SOGo/$1.SOGo/Resources/$2;
} }
} }