IPBS_Station/Bin/conf/nginx.conf
2024-08-15 11:18:18 +08:00

33 lines
956 B
Nginx Configuration File

worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 5180;
server_name 192.168.1.23;
location / {
# root html;
index index.html index.htm;
try_files $uri $uri/ /index.html;
# try_files $uri $uri/ @router;
}
location /api/ {
#rewrite ^.+api/?(.*)$ /$1 break;
rewrite ^/api/(.*)$ /$1 break;
proxy_pass http://192.168.1.23:8080/;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
}