65 lines
1.4 KiB
Nginx Configuration File
65 lines
1.4 KiB
Nginx Configuration File
|
|
#user nobody;
|
|
worker_processes 1;
|
|
|
|
events {
|
|
worker_connections 1024;
|
|
}
|
|
|
|
http {
|
|
include mime.types;
|
|
default_type application/octet-stream;
|
|
client_max_body_size 50m;
|
|
|
|
sendfile on;
|
|
keepalive_timeout 65;
|
|
|
|
server {
|
|
listen 8888;
|
|
server_name web;
|
|
|
|
location /map-resouce/ {
|
|
root /home/sis/apps/map;
|
|
}
|
|
|
|
location / {
|
|
root /home/sis/apps/security-pc/dist;
|
|
index index.html;
|
|
}
|
|
|
|
location ^~ /oauth/redirect {
|
|
rewrite ^(.*)$ /index.html break;
|
|
}
|
|
|
|
location /api/ {
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_buffering off;
|
|
rewrite ^/api/(.*)$ /$1 break;
|
|
proxy_pass http://127.0.0.1:8000;
|
|
}
|
|
}
|
|
|
|
server {
|
|
listen 8889; #监听端口
|
|
server_name app; #服务器名
|
|
|
|
location /sis/api/ {
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_buffering off;
|
|
rewrite ^/sis/api/(.*)$ /$1 break;
|
|
proxy_pass http://127.0.0.1:8000;
|
|
}
|
|
|
|
location ^~ /sis {
|
|
alias /home/sis/apps/security-app/dist/sis;
|
|
index index.html;
|
|
try_files $uri $uri/ /index.html;
|
|
}
|
|
|
|
}
|
|
}
|