Files
Artveris/docker/nginx/nginx.conf
T

46 lines
985 B
Nginx Configuration File

# 管理后台(默认 80 端口)
server {
listen 80;
server_name _;
root /usr/share/nginx/html/admin;
index index.html;
location /api/ {
proxy_pass http://api:3000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
client_max_body_size 120m;
}
location /uploads/ {
proxy_pass http://api:3000;
}
location /t/ {
proxy_pass http://api:3000;
}
location / {
try_files $uri $uri/ /index.html;
}
}
# C 端移动溯源页(8080 端口)
server {
listen 8080;
server_name _;
root /usr/share/nginx/html/h5;
index index.html;
location /api/ {
proxy_pass http://api:3000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /uploads/ {
proxy_pass http://api:3000;
}
location / {
try_files $uri $uri/ /index.html;
}
}