mirror of
https://gitee.com/dromara/RuoYi-Vue-Plus.git
synced 2026-09-13 23:53:42 +08:00
56 lines
1.3 KiB
Nginx Configuration File
56 lines
1.3 KiB
Nginx Configuration File
worker_processes auto;
|
|
error_log /var/log/nginx/error.log warn;
|
|
pid /var/run/nginx.pid;
|
|
|
|
events {
|
|
worker_connections 2048;
|
|
}
|
|
|
|
http {
|
|
include /etc/nginx/mime.types;
|
|
default_type application/octet-stream;
|
|
sendfile on;
|
|
keepalive_timeout 65;
|
|
client_max_body_size 100m;
|
|
gzip_static on;
|
|
server_tokens off;
|
|
|
|
map $http_upgrade $connection_upgrade {
|
|
default upgrade;
|
|
'' close;
|
|
}
|
|
|
|
upstream backend {
|
|
server backend:8080;
|
|
}
|
|
|
|
server {
|
|
listen 80;
|
|
server_name _;
|
|
|
|
location / {
|
|
root /usr/share/nginx/html;
|
|
try_files $uri $uri/ /index.html;
|
|
index index.html;
|
|
}
|
|
|
|
location /prod-api/ {
|
|
proxy_set_header Host $http_host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection $connection_upgrade;
|
|
proxy_read_timeout 86400s;
|
|
proxy_buffering off;
|
|
proxy_cache off;
|
|
proxy_pass http://backend/;
|
|
}
|
|
|
|
location ~ ^(/[^/]*)?/actuator.*(/.*)?$ {
|
|
return 403;
|
|
}
|
|
}
|
|
}
|