37 lines
1.2 KiB
Plaintext
37 lines
1.2 KiB
Plaintext
server {
|
|
listen 80;
|
|
server_name localhost;
|
|
location = /docs {
|
|
proxy_pass http://127.0.0.1:9999/docs;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
}
|
|
location = /redoc {
|
|
proxy_pass http://127.0.0.1:9999/redoc;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
}
|
|
location = /openapi.json {
|
|
proxy_pass http://127.0.0.1:9999/openapi.json;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
}
|
|
location / {
|
|
root /opt/vue-fastapi-admin/web/dist;
|
|
index index.html index.htm;
|
|
try_files $uri /index.html;
|
|
}
|
|
|
|
location ^~ /pc/ {
|
|
root /opt/vue-fastapi-admin/web1/dist;
|
|
index index.html index.htm;
|
|
try_files $uri /index.html;
|
|
}
|
|
location ^~ /api/ {
|
|
proxy_pass http://127.0.0.1:9999;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
}
|
|
|
|
}
|