mirror of
https://github.com/PlayEdu/docker-playedu-light
synced 2025-12-26 16:49:49 +08:00
端口修改
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user