Simplified nginx config

This commit is contained in:
pavelbannov 2019-08-14 16:55:56 +03:00
parent d440e0d3ed
commit 9d342ddb67

View File

@ -73,38 +73,8 @@ server {
proxy_pass http://localhost:5002; proxy_pass http://localhost:5002;
proxy_set_header X-REWRITER-URL $X_REWRITER_URL; proxy_set_header X-REWRITER-URL $X_REWRITER_URL;
location ~* /sockjs-node { location ~* /(sockjs-node|images|locales) {
rewrite products/people(.*)/sockjs-node/(.*) /sockjs-node/$2 break; rewrite products/people(.*)/(sockjs-node|images|locales)/(.*) /$2/$3 break;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $host;
proxy_pass http://localhost:5002;
proxy_redirect off;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
location ~* /images {
rewrite products/people(.*)/images/(.*) /images/$2 break;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $host;
proxy_pass http://localhost:5002;
proxy_redirect off;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
location ~* /locales {
rewrite products/people(.*)/locales/(.*) /locales/$2 break;
proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $host; proxy_set_header Host $host;