端口修改

This commit is contained in:
none
2023-05-30 11:50:27 +08:00
parent d861eaf710
commit 13c58500c1
2 changed files with 32 additions and 13 deletions

View File

@@ -1,5 +1,5 @@
server {
listen 80 default_server;
listen 9800 default_server;
absolute_redirect off;
server_name _;
@@ -24,11 +24,25 @@ server {
proxy_pass http://127.0.0.1:9898/;
}
location /admin {
alias /app/backend;
index index.html;
try_files $uri $uri/ /admin/index.html;
location ~ /\.ht {
deny all;
}
location ~* ^/(?![api].*) {
try_files $uri /index.html;
}
}
server {
listen 9900 default_server;
absolute_redirect off;
server_name _;
root /app/backend;
index index.html;
location / {
try_files $uri $uri/ /index.html;
gzip on;
gzip_static on;
@@ -37,13 +51,19 @@ server {
gzip_comp_level 5;
gzip_types text/plain application/javascript text/css application/xml text/javascript;
gzip_vary on;
}
location /api/ {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://127.0.0.1:9898/;
}
location ~ /\.ht {
deny all;
}
location ~* ^/(?![api|admin].*) {
location ~* ^/(?![api].*) {
try_files $uri /index.html;
}
}