nginx-proxy/default.conf

310 lines
12 KiB
Plaintext
Raw Normal View History

2023-05-07 11:03:39 +00:00
server {
root /usr/share/nginx/html;
index index.html index.htm index.nginx-debian.html;
server_name _; # managed by Certbot
2024-01-15 13:54:47 +00:00
client_max_body_size 70M;
2023-05-07 11:52:43 +00:00
2024-01-24 00:00:47 +00:00
location /404 {
try_files $uri $uri/ /index.html;
}
2023-05-07 11:52:43 +00:00
location /auth {
if ($request_method = OPTIONS) {
add_header Access-Control-Allow-Origin $http_origin always;
add_header Access-Control-Allow-Credentials true always;
2023-05-07 19:16:18 +00:00
add_header Access-Control-Allow-Headers content-type,authorization always;
2023-05-07 11:52:43 +00:00
return 200;
}
2024-01-21 00:19:38 +00:00
if ($host = sadmin.pena) {
2024-01-15 13:54:47 +00:00
proxy_pass http://10.6.0.11:59301;
2023-05-07 11:52:43 +00:00
}
2024-01-21 00:19:38 +00:00
if ($host != sadmin.pena) {
2024-01-15 13:54:47 +00:00
proxy_pass http://10.6.0.11:59300;
2023-05-07 11:52:43 +00:00
}
proxy_hide_header Access-Control-Allow-Origin;
add_header Access-Control-Allow-Origin $http_origin always;
add_header Access-Control-Allow-Credentials true always;
}
2023-05-09 18:49:30 +00:00
location /user/ {
2023-05-31 16:28:04 +00:00
if ($request_method = OPTIONS) {
add_header Access-Control-Allow-Origin $http_origin always;
add_header Access-Control-Allow-Credentials true always;
2023-05-31 17:00:53 +00:00
add_header Access-Control-Allow-Headers content-type,authorization always;
2023-05-31 16:40:53 +00:00
add_header Access-Control-Allow-Methods OPTIONS,GET,POST,PATCH,PUT,DELETE;
2023-05-31 16:28:04 +00:00
return 200;
}
2023-05-07 19:29:36 +00:00
add_header Access-Control-Allow-Origin $http_origin always;
add_header Access-Control-Allow-Credentials true always;
add_header Access-Control-Allow-Headers content-type,authorization always;
2023-05-31 16:28:04 +00:00
add_header Access-Control-Allow-Methods OPTIONS,GET,POST,PATCH,PUT,DELETE;
2024-01-15 13:54:47 +00:00
proxy_pass http://10.6.0.11:59300;
2023-05-07 11:52:43 +00:00
}
location /swagger/ {
2024-01-15 13:54:47 +00:00
proxy_pass http://10.6.0.11:59300/;
2023-05-07 11:52:43 +00:00
}
location /heruvym/ {
add_header Access-Control-Allow-Origin $http_origin always;
2023-05-07 19:29:36 +00:00
add_header Access-Control-Allow-Credentials true always;
2023-08-20 19:06:33 +00:00
add_header Access-Control-Allow-Headers content-type,authorization,sess always;
2023-05-11 16:24:12 +00:00
add_header Access-Control-Allow-Methods OPTIONS,GET,POST,PATCH,PUT,DELETE;
2023-05-07 11:52:43 +00:00
proxy_set_header Referer $host;
proxy_set_header Origin $http_origin;
proxy_set_header Connection '';
proxy_http_version 1.1;
chunked_transfer_encoding off;
proxy_buffering off;
proxy_cache off;
proxy_pass https://10.6.0.11:1488/;
}
location /strator/ {
2023-06-01 18:37:28 +00:00
if ($request_method = OPTIONS) {
add_header Access-Control-Allow-Origin $http_origin always;
2023-05-07 19:29:36 +00:00
add_header Access-Control-Allow-Credentials true always;
add_header Access-Control-Allow-Headers content-type,authorization always;
2023-06-01 18:37:28 +00:00
add_header Access-Control-Allow-Methods OPTIONS,GET,POST,PATCH,PUT,DELETE;
return 200;
}
add_header Access-Control-Allow-Origin $http_origin always;
add_header Access-Control-Allow-Credentials true always;
add_header Access-Control-Allow-Headers content-type,authorization always;
add_header Access-Control-Allow-Methods OPTIONS,GET,POST,PATCH,PUT,DELETE;
2024-01-15 13:54:47 +00:00
proxy_pass http://10.6.0.11:59303/;
2023-05-07 11:52:43 +00:00
}
2023-06-11 16:42:03 +00:00
2023-06-23 15:42:29 +00:00
location /customer/ {
if ($request_method = OPTIONS) {
add_header Access-Control-Allow-Origin $http_origin always;
add_header Access-Control-Allow-Credentials true always;
add_header Access-Control-Allow-Headers content-type,authorization always;
add_header Access-Control-Allow-Methods OPTIONS,GET,POST,PATCH,PUT,DELETE;
return 200;
}
add_header Access-Control-Allow-Origin $http_origin always;
add_header Access-Control-Allow-Credentials true always;
add_header Access-Control-Allow-Headers content-type,authorization always;
add_header Access-Control-Allow-Methods OPTIONS,GET,POST,PATCH,PUT,DELETE;
2024-01-15 13:54:47 +00:00
proxy_pass http://10.6.0.11:8065/;
2023-06-23 15:42:29 +00:00
}
2024-01-18 02:17:30 +00:00
location /codeword/ {
if ($request_method = OPTIONS) {
add_header Access-Control-Allow-Origin $http_origin always;
add_header Access-Control-Allow-Credentials true always;
add_header Access-Control-Allow-Headers content-type,authorization always;
add_header Access-Control-Allow-Methods OPTIONS,GET,POST,PATCH,PUT,DELETE;
return 200;
}
add_header Access-Control-Allow-Origin $http_origin always;
add_header Access-Control-Allow-Credentials true always;
add_header Access-Control-Allow-Headers content-type,authorization always;
add_header Access-Control-Allow-Methods OPTIONS,GET,POST,PATCH,PUT,DELETE;
proxy_pass http://10.6.0.11:59664/;
}
2023-12-17 10:23:31 +00:00
location /answer/ {
2023-10-22 23:42:58 +00:00
if ($request_method = OPTIONS) {
add_header Access-Control-Allow-Origin $http_origin always;
add_header Access-Control-Allow-Credentials true always;
2024-01-23 00:54:49 +00:00
add_header Access-Control-Allow-Headers content-type,x-sessionkey always;
2024-01-23 01:48:21 +00:00
add_header Access-Control-Expose-Headers x-sessionkey always;
2023-10-22 23:42:58 +00:00
add_header Access-Control-Allow-Methods OPTIONS,GET,POST,PATCH,PUT,DELETE;
return 200;
}
add_header Access-Control-Allow-Origin $http_origin always;
add_header Access-Control-Allow-Credentials true always;
2024-01-23 00:54:49 +00:00
add_header Access-Control-Allow-Headers content-type,x-sessionkey always;
2024-01-23 01:57:40 +00:00
add_header Access-Control-Expose-Headers x-sessionkey always;
2023-10-22 23:42:58 +00:00
add_header Access-Control-Allow-Methods OPTIONS,GET,POST,PATCH,PUT,DELETE;
2023-12-17 10:23:31 +00:00
proxy_pass http://10.6.0.23:1490/;
2023-12-12 09:19:38 +00:00
}
2023-12-17 10:23:31 +00:00
location /squiz/ {
2023-12-12 09:19:38 +00:00
if ($request_method = OPTIONS) {
add_header Access-Control-Allow-Origin $http_origin always;
add_header Access-Control-Allow-Credentials true always;
add_header Access-Control-Allow-Headers content-type,authorization always;
add_header Access-Control-Allow-Methods OPTIONS,GET,POST,PATCH,PUT,DELETE;
return 200;
}
2023-12-12 09:19:38 +00:00
add_header Access-Control-Allow-Origin $http_origin always;
add_header Access-Control-Allow-Credentials true always;
add_header Access-Control-Allow-Headers content-type,authorization always;
add_header Access-Control-Allow-Methods OPTIONS,GET,POST,PATCH,PUT,DELETE;
2023-12-17 10:23:31 +00:00
proxy_pass http://10.6.0.23:1488/;
2023-10-22 23:42:58 +00:00
}
2023-10-24 20:53:45 +00:00
location /squizstorer/ {
if ($request_method = OPTIONS) {
add_header Access-Control-Allow-Origin $http_origin always;
add_header Access-Control-Allow-Credentials true always;
add_header Access-Control-Allow-Headers content-type,authorization always;
add_header Access-Control-Allow-Methods OPTIONS,GET,POST,PATCH,PUT,DELETE;
return 200;
}
add_header Access-Control-Allow-Origin $http_origin always;
add_header Access-Control-Allow-Credentials true always;
add_header Access-Control-Allow-Headers content-type,authorization always;
add_header Access-Control-Allow-Methods OPTIONS,GET,POST,PATCH,PUT,DELETE;
proxy_set_header Referer $host;
proxy_set_header Origin $http_origin;
proxy_set_header Connection '';
proxy_http_version 1.1;
chunked_transfer_encoding off;
proxy_buffering off;
proxy_cache off;
proxy_pass http://10.6.0.23:1489/;
}
2023-10-22 23:42:58 +00:00
2023-06-11 16:42:03 +00:00
location /price/ {
if ($request_method = OPTIONS) {
add_header Access-Control-Allow-Origin $http_origin always;
add_header Access-Control-Allow-Credentials true always;
add_header Access-Control-Allow-Headers content-type,authorization always;
add_header Access-Control-Allow-Methods OPTIONS,GET,POST,PATCH,PUT,DELETE;
return 200;
}
add_header Access-Control-Allow-Origin $http_origin always;
add_header Access-Control-Allow-Credentials true always;
add_header Access-Control-Allow-Headers content-type,authorization always;
add_header Access-Control-Allow-Methods OPTIONS,GET,POST,PATCH,PUT,DELETE;
proxy_pass http://10.6.0.11:8001/;
}
2023-05-07 11:52:43 +00:00
location /feedback/ {
2023-05-07 15:07:31 +00:00
if ($request_method = OPTIONS) {
add_header Access-Control-Allow-Origin $http_origin always;
add_header Access-Control-Allow-Credentials true always;
add_header Access-Control-Allow-Headers content-type always;
return 200;
}
2023-05-07 15:34:30 +00:00
add_header Access-Control-Allow-Origin $http_origin always;
add_header Access-Control-Allow-Credentials true always;
add_header Access-Control-Allow-Headers content-type always;
2023-05-07 11:52:43 +00:00
proxy_set_header Host $host;
2024-01-24 00:00:47 +00:00
proxy_pass http://10.8.0.6:8006/;
2023-05-07 11:52:43 +00:00
}
2023-07-18 22:03:12 +00:00
location /verification1 {
2023-07-07 09:26:55 +00:00
if ($request_method = OPTIONS) {
add_header Access-Control-Allow-Origin $http_origin always;
add_header Access-Control-Allow-Credentials true always;
2023-07-19 12:24:29 +00:00
add_header Access-Control-Allow-Headers content-type always;
add_header Access-Control-Allow-Methods GET;
2023-07-07 09:26:55 +00:00
return 200;
}
2023-07-03 12:08:47 +00:00
add_header Access-Control-Allow-Origin $http_origin always;
add_header Access-Control-Allow-Credentials true always;
2023-07-19 12:24:29 +00:00
add_header Access-Control-Allow-Headers content-type always;
add_header Access-Control-Allow-Methods GET;
2023-07-18 22:03:12 +00:00
chunked_transfer_encoding off;
proxy_buffering off;
proxy_cache off;
proxy_pass https://storage.yandexcloud.net;
}
2023-11-28 20:38:21 +00:00
location /squizimages {
if ($request_method = OPTIONS) {
add_header Access-Control-Allow-Origin $http_origin always;
add_header Access-Control-Allow-Credentials true always;
add_header Access-Control-Allow-Headers content-type always;
add_header Access-Control-Allow-Methods GET;
return 200;
}
add_header Access-Control-Allow-Origin $http_origin always;
add_header Access-Control-Allow-Credentials true always;
add_header Access-Control-Allow-Headers content-type always;
add_header Access-Control-Allow-Methods GET;
chunked_transfer_encoding off;
proxy_buffering off;
proxy_cache off;
proxy_pass https://storage.yandexcloud.net;
}
2023-07-18 22:03:12 +00:00
location /verification/ {
if ($request_method = OPTIONS) {
add_header Access-Control-Allow-Origin $http_origin always;
add_header Access-Control-Allow-Credentials true always;
2023-07-19 12:24:29 +00:00
add_header Access-Control-Allow-Headers content-type,authorization always;
add_header Access-Control-Allow-Methods OPTIONS,GET,POST,PATCH,PUT,DELETE;
2023-07-18 22:03:12 +00:00
return 200;
}
add_header Access-Control-Allow-Origin $http_origin always;
add_header Access-Control-Allow-Credentials true always;
2023-07-19 12:24:29 +00:00
add_header Access-Control-Allow-Headers content-type,authorization always;
add_header Access-Control-Allow-Methods OPTIONS,GET,POST,PATCH,PUT,DELETE;
2023-07-03 12:08:47 +00:00
proxy_set_header Referer $host;
proxy_set_header Origin $http_origin;
proxy_set_header Connection '';
proxy_http_version 1.1;
chunked_transfer_encoding off;
proxy_buffering off;
proxy_cache off;
2024-01-15 13:54:47 +00:00
proxy_pass http://10.6.0.17:7035/;
2023-07-03 12:08:47 +00:00
}
2023-05-07 11:52:43 +00:00
2023-05-07 11:03:39 +00:00
location / {
2024-01-17 14:37:20 +00:00
if ($host = shub.pena.digital) {
2023-05-07 11:03:39 +00:00
proxy_pass http://hub;
}
2024-01-17 14:37:20 +00:00
if ($host = sdocs.pena.digital) {
2023-05-07 11:03:39 +00:00
proxy_pass http://docs;
2023-05-07 11:52:43 +00:00
}
if ($host = services.pena.digital) {
proxy_pass http://services;
}
2024-01-17 14:37:20 +00:00
if ($host = slinks.pena.digital) {
2023-05-07 11:52:43 +00:00
proxy_pass http://dwarfener;
}
2024-01-17 14:37:20 +00:00
if ($host = smetrica.pena.digital) {
2023-09-09 21:21:01 +00:00
proxy_pass http://metrica;
}
2024-01-17 14:37:20 +00:00
if ($host = s.hbpn.link) {
add_header Access-Control-Allow-Origin $http_origin always;
2023-12-18 00:15:37 +00:00
proxy_pass http://respondent;
}
2024-01-17 14:37:20 +00:00
if ($host = soauth.pena.digital) {
2023-08-29 11:13:01 +00:00
add_header Access-Control-Allow-Origin $http_origin always;
add_header Access-Control-Allow-Credentials true always;
add_header Access-Control-Allow-Headers content-type,authorization always;
add_header Access-Control-Allow-Methods OPTIONS,GET,POST,PATCH,PUT,DELETE;
2024-01-15 13:54:47 +00:00
proxy_pass http://10.6.0.11:59344;
2023-07-01 16:09:00 +00:00
}
2023-10-23 14:10:50 +00:00
if ($host = newerait.pena.digital) {
2023-12-12 14:23:30 +00:00
proxy_pass http://squizlanding;
2023-10-23 14:10:50 +00:00
}
2023-07-01 16:09:00 +00:00
if ($host = squiz.pena.digital) {
proxy_pass http://squiz;
2023-05-07 11:03:39 +00:00
}
}
2024-02-11 11:21:38 +00:00
location /robots.txt {
if ($host = services,pena.digital) {
return 301 https://pena.digital/robots.txt;
}
try_files $uri $uri/ /index.html;
}
2024-01-21 00:19:38 +00:00
listen [::]:443 ssl ipv6only=on;
2023-05-07 11:03:39 +00:00
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/nginx/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/nginx/privkey.pem; # managed by Certbot
}
server {
listen 80 ;
listen [::]:80 ;
server_name _;
2024-02-11 11:21:38 +00:00
location /robots.txt {
if ($host = services,pena.digital) {
return 301 https://pena.digital/robots.txt;
}
try_files $uri $uri/ /index.html;
}
2023-05-07 11:03:39 +00:00
return 301 https://$host$request_uri;
}