Загрузка данных
dministrator@astra-77777:~$ sudo docker exec smp-smp-nginx-1 sh -c 'cat /etc/nginx/nginx.conf'
worker_processes auto;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
client_max_body_size 16m;
# logging
log_format timed_combined '$remote_addr - [$time_local] "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent". Completed in $request_time sec';
access_log /dev/stdout timed_combined;
error_log /dev/stdout info;
# hide nginx
server_tokens off;
# backup service
include ./snippets/backup/http.conf;
# caching
include ./snippets/cache-expiration.conf;
# timeouts
proxy_connect_timeout 300;
proxy_send_timeout 300;
proxy_read_timeout 300;
send_timeout 300;
# enable response compression
gzip on;
gzip_disable "msie6";
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript;
proxy_hide_header X-Powered-By;
error_page 497 https://$host:$server_port$request_uri;
# Prime Management Services (MS) config
server {
listen 1025;
server_name _;
# timeouts
proxy_connect_timeout 300;
proxy_send_timeout 300;
proxy_read_timeout 300;
send_timeout 300;
# enable response compression
gzip on;
gzip_disable "msie6";
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript;
add_header X-XSS-Protection "1; mode=block";
# resolver
resolver 127.0.0.11 valid=30s ipv6=off;
location = /robots.txt {
return 200 "User-agent: *\nDisallow: /";
}
# includes
include ./snippets/hosts.conf;
include ./snippets/frontend.conf;
include ./snippets/backup/locations.conf;
# backend signalR services
location ~* ^/api/signalr/notificationHub {
resolver 127.0.0.11 valid=30s ipv6=off;
proxy_pass http://$smp_host;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
}
# backend rest services
location ~* ^/api/(.*)$ {
include ./snippets/api.conf;
proxy_pass http://$smp_host/api/$1$is_args$args;
# publish activity logs endpoint
location ~* /events {
proxy_pass http://$log_host;
limit_except POST {
deny all;
}
}
# transport
location ~* /transport/[^/]+/[^/]+$ {
proxy_request_buffering off;
client_max_body_size 4G;
proxy_pass http://$smp_host;
}
# software update
location ~* ^/api/software-update$ {
proxy_request_buffering off;
client_max_body_size 4G;
proxy_pass http://$smp_host;
}
# devices dictionaries
location ~* ^/api/devices/.+/dictionaries/.*$ {
proxy_request_buffering off;
client_max_body_size 4G;
proxy_pass http://$smp_host;
}
# storage
location ~* ^/api/storage$ {
proxy_request_buffering off;
client_max_body_size 4G;
proxy_pass http://$smp_host;
}
# user photos
include ./snippets/locations/user-photos.location.conf;
}
# health check
location ~* ^/hc {
include ./snippets/api.conf;
proxy_pass http://$smp_host;
access_log off;
}
# nginx health check
location /nginx-hc {
access_log off;
return 200 "Healthy\n";
}
}
include /etc/nginx/sites-enabled/*;
}
administrator@astra-77777:~$