68 lines
1.4 KiB
Nginx Configuration File
68 lines
1.4 KiB
Nginx Configuration File
user nginx;
|
|
worker_processes 1;
|
|
|
|
error_log /var/log/nginx/error.log warn;
|
|
pid /var/run/nginx.pid;
|
|
|
|
events {
|
|
worker_connections 1024;
|
|
}
|
|
|
|
http {
|
|
resolver 127.0.0.11;
|
|
|
|
gzip on;
|
|
gzip_static on;
|
|
gzip_comp_level 2;
|
|
gzip_min_length 64;
|
|
|
|
types {
|
|
application/manifest+json webmanifest;
|
|
}
|
|
include /etc/nginx/mime.types;
|
|
default_type application/octet-stream;
|
|
|
|
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
|
'$status $body_bytes_sent "$http_referer" '
|
|
'"$http_user_agent" "$http_x_forwarded_for"';
|
|
|
|
access_log /var/log/nginx/access.log main;
|
|
|
|
sendfile on;
|
|
tcp_nopush on;
|
|
tcp_nodelay on;
|
|
|
|
keepalive_timeout 65;
|
|
|
|
upstream server {
|
|
server server:8083;
|
|
}
|
|
|
|
server {
|
|
listen 8082 default_server;
|
|
listen [::]:8082 default_server;
|
|
server_name _;
|
|
|
|
root "/usr/share/nginx/html";
|
|
|
|
location /api {
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header Host $http_host;
|
|
proxy_pass http://server;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "Upgrade";
|
|
}
|
|
|
|
location /assets {
|
|
expires 365d;
|
|
}
|
|
|
|
location = / {
|
|
try_files "" /index.html;
|
|
}
|
|
|
|
error_page 404 /;
|
|
}
|
|
}
|