mirror of
https://github.com/PlayEdu/docker-playedu-light
synced 2025-12-26 12:42:40 +08:00
airplane
This commit is contained in:
49
conf/nginx.conf
Normal file
49
conf/nginx.conf
Normal file
@@ -0,0 +1,49 @@
|
||||
server {
|
||||
listen 80 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 /admin {
|
||||
alias /app/backend;
|
||||
index index.html;
|
||||
|
||||
try_files $uri $uri/ /admin/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 ~ /\.ht {
|
||||
deny all;
|
||||
}
|
||||
|
||||
location ~* ^/(?![api|admin].*) {
|
||||
try_files $uri /index.html;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user