2019-07-15 13:57:53 +00:00
|
|
|
map $http_host $this_host {
|
|
|
|
"" $host;
|
|
|
|
default $http_host;
|
|
|
|
}
|
2019-07-05 13:58:04 +00:00
|
|
|
|
2019-07-15 13:57:53 +00:00
|
|
|
map $http_x_forwarded_proto $the_scheme {
|
|
|
|
default $http_x_forwarded_proto;
|
|
|
|
"" $scheme;
|
|
|
|
}
|
2019-07-05 13:58:04 +00:00
|
|
|
|
2019-07-15 13:57:53 +00:00
|
|
|
map $http_x_forwarded_host $the_host {
|
|
|
|
default $http_x_forwarded_host;
|
|
|
|
"" $this_host;
|
|
|
|
}
|
2019-07-05 13:58:04 +00:00
|
|
|
|
2019-07-15 13:57:53 +00:00
|
|
|
server {
|
|
|
|
listen 8092;
|
|
|
|
|
|
|
|
add_header Access-Control-Allow-Origin *;
|
|
|
|
|
|
|
|
large_client_header_buffers 4 16k;
|
|
|
|
|
|
|
|
set $X_REWRITER_URL $the_scheme://$the_host;
|
2019-07-05 13:58:04 +00:00
|
|
|
|
2019-07-15 13:57:53 +00:00
|
|
|
if ($http_x_rewriter_url != '') {
|
|
|
|
set $X_REWRITER_URL $http_x_rewriter_url ;
|
2019-07-05 13:58:04 +00:00
|
|
|
}
|
2019-07-15 13:57:53 +00:00
|
|
|
|
|
|
|
fastcgi_read_timeout 600;
|
|
|
|
fastcgi_send_timeout 600;
|
|
|
|
fastcgi_keep_conn on;
|
|
|
|
fastcgi_intercept_errors on;
|
2019-07-05 13:58:04 +00:00
|
|
|
|
2019-07-15 13:57:53 +00:00
|
|
|
include fastcgi_params;
|
2019-07-05 13:58:04 +00:00
|
|
|
|
2019-07-15 13:57:53 +00:00
|
|
|
fastcgi_param HTTP_X_REWRITER_URL $http_x_rewriter_url;
|
|
|
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
|
|
|
fastcgi_param PATH_INFO "";
|
|
|
|
|
|
|
|
location / {
|
|
|
|
proxy_pass http://localhost:5001;
|
|
|
|
|
2019-08-06 13:18:07 +00:00
|
|
|
location ~* /sockjs-node {
|
2019-07-15 13:57:53 +00:00
|
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
|
|
proxy_set_header X-Forwarded-For $remote_addr;
|
|
|
|
proxy_set_header Host $host;
|
2019-07-05 13:58:04 +00:00
|
|
|
|
2019-07-15 13:57:53 +00:00
|
|
|
proxy_pass http://localhost:5001;
|
2019-07-05 13:58:04 +00:00
|
|
|
|
2019-07-15 13:57:53 +00:00
|
|
|
proxy_redirect off;
|
2019-07-05 13:58:04 +00:00
|
|
|
|
2019-07-15 13:57:53 +00:00
|
|
|
proxy_http_version 1.1;
|
|
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
|
|
proxy_set_header Connection "upgrade";
|
|
|
|
}
|
2019-07-05 13:58:04 +00:00
|
|
|
|
2019-08-06 13:18:07 +00:00
|
|
|
location ~* /api/2.0 {
|
2019-08-05 12:55:31 +00:00
|
|
|
gzip on;
|
|
|
|
gzip_types application/json application/xml;
|
2019-07-15 13:57:53 +00:00
|
|
|
proxy_pass http://localhost:5000;
|
|
|
|
proxy_set_header X-REWRITER-URL $X_REWRITER_URL;
|
2019-07-10 11:57:30 +00:00
|
|
|
|
2019-08-06 13:18:07 +00:00
|
|
|
location ~* /(people|group) {
|
2019-07-15 13:57:53 +00:00
|
|
|
proxy_pass http://localhost:5004;
|
|
|
|
proxy_set_header X-REWRITER-URL $X_REWRITER_URL;
|
2019-07-08 09:22:03 +00:00
|
|
|
|
2019-07-15 11:45:07 +00:00
|
|
|
}
|
2019-07-15 13:57:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
location /products {
|
2019-08-06 13:18:07 +00:00
|
|
|
location ~* /people {
|
2019-07-15 13:57:53 +00:00
|
|
|
#rewrite products/people/(.*) /$1 break;
|
|
|
|
proxy_pass http://localhost:5002;
|
|
|
|
proxy_set_header X-REWRITER-URL $X_REWRITER_URL;
|
|
|
|
|
2019-08-14 13:55:56 +00:00
|
|
|
location ~* /(sockjs-node|images|locales) {
|
|
|
|
rewrite products/people(.*)/(sockjs-node|images|locales)/(.*) /$2/$3 break;
|
2019-08-13 14:48:04 +00:00
|
|
|
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;
|
|
|
|
|
2019-07-15 13:57:53 +00:00
|
|
|
proxy_http_version 1.1;
|
|
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
|
|
proxy_set_header Connection "upgrade";
|
2019-07-15 11:45:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2019-07-15 13:57:53 +00:00
|
|
|
}
|
|
|
|
}
|
2019-07-10 11:57:30 +00:00
|
|
|
|
|
|
|
include /etc/nginx/includes/onlyoffice-*.conf;
|