55 lines
1.9 KiB
Nginx Configuration File
55 lines
1.9 KiB
Nginx Configuration File
# Запускать в качестве менее привилегированного пользователя по соображениям безопасности..
|
|
user nginx;
|
|
|
|
# Значение auto устанавливает число максимально доступных ядер CPU,
|
|
# чтобы обеспечить лучшую производительность.
|
|
worker_processes auto;
|
|
|
|
events { worker_connections 1024; }
|
|
|
|
http {
|
|
server {
|
|
# Hide nginx version information.
|
|
server_tokens off;
|
|
|
|
listen 80;
|
|
root /usr/share/nginx/html;
|
|
include /etc/nginx/mime.types;
|
|
|
|
location /api/ {
|
|
proxy_pass http://api:5125/api/;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
proxy_set_header X-Forwarded-Prefix /test;
|
|
}
|
|
|
|
location / {
|
|
try_files $uri $uri/ /index.html;
|
|
}
|
|
|
|
gzip on;
|
|
gzip_vary on;
|
|
gzip_http_version 1.0;
|
|
gzip_comp_level 5;
|
|
gzip_types
|
|
application/atom+xml
|
|
application/javascript
|
|
application/json
|
|
application/rss+xml
|
|
application/vnd.ms-fontobject
|
|
application/x-font-ttf
|
|
application/x-web-app-manifest+json
|
|
application/xhtml+xml
|
|
application/xml
|
|
font/opentype
|
|
image/svg+xml
|
|
image/x-icon
|
|
text/css
|
|
text/plain
|
|
text/x-component;
|
|
gzip_proxied no-cache no-store private expired auth;
|
|
gzip_min_length 256;
|
|
gunzip on;
|
|
}
|
|
} |