mirror of
https://github.com/PlayEdu/docker-playedu-light
synced 2025-06-08 01:54:11 +08:00
69 lines
1.4 KiB
Nginx Configuration File
69 lines
1.4 KiB
Nginx Configuration File
server {
|
|
listen 9800 default_server;
|
|
absolute_redirect off;
|
|
server_name _;
|
|
|
|
root /app/frontend;
|
|
index index.html;
|
|
|
|
location / {
|
|
try_files $uri $uri/ /index.html;
|
|
|
|
gzip on;
|
|
gzip_static on;
|
|
gzip_buffers 4 16k;
|
|
gzip_http_version 1.1;
|
|
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].*) {
|
|
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;
|
|
gzip_buffers 4 16k;
|
|
gzip_http_version 1.1;
|
|
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].*) {
|
|
try_files $uri /index.html;
|
|
}
|
|
} |