有两个子域,app.example.com和admin.example.com,使用nginxv1.14.1表示js。
臭虫:
virtual.conf
server {
listen admin.example.com:80;
server_name admin.example.com;
location / {
proxy_pass http://127.0.0.1:8080;
}
}
server {
listen app.example.com:80;
server_name app.example.com;
location / {
proxy_pass http://127.0.0.1:8081;
}
}发布于 2019-04-01 12:22:24
已解决:
app.listen('8080')更改为app.listen('8080', '127.0.0.1')listen行中的子域名。nginx又来了。virtual.conf
server {
listen 80;
server_name admin.example.com;
location / {
proxy_pass http://127.0.0.1:8080;
}
}
server {
listen 80;
server_name app.example.com;
location / {
proxy_pass http://127.0.0.1:8081;
}
}https://stackoverflow.com/questions/55453723
复制相似问题