nginx.conf update

This commit is contained in:
tmshv committed 2016-03-23 01:00:07 +03:00
1 parent 12b39c8b0b
commit 969112807c
1 file changed
+27 -2
+27 -2
View File
@@ -36,15 +36,36 @@ server {
ssl_prefer_server_ciphers on; ssl_prefer_server_ciphers on;
ssl_ciphers AES256+EECDH:AES256+EDH:!aNULL; ssl_ciphers AES256+EECDH:AES256+EDH:!aNULL;
return 301 https://art.shlisselburg.org$request_uri; location / {
return 301 https://art.shlisselburg.org;
}
location /api {
proxy_pass http://hudozka_api;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
}
error_log /var/log/nginx/art.shburg.api.error.log;
access_log /var/log/nginx/art.shburg.api.access.log;
} }
server { server {
listen 80; listen 80;
server_name art.shlisselburg.org art.shburg.org; server_name art.shlisselburg.org;
return 301 https://art.shlisselburg.org$request_uri; return 301 https://art.shlisselburg.org$request_uri;
} }
server {
listen 80;
server_name art.shburg.org;
return 301 https://art.shburg.org$request_uri;
}
map $http_upgrade $connection_upgrade { map $http_upgrade $connection_upgrade {
default upgrade; default upgrade;
'' close; '' close;
@@ -53,3 +74,7 @@ map $http_upgrade $connection_upgrade {
upstream hudozka { upstream hudozka {
server localhost:1800; server localhost:1800;
} }
upstream hudozka_api {
server localhost:18000;
}