Error screenshot:
Configuration when error is reported:
server {
listen 8089;
server_name localhost;
location / {
root ./dist/logistics/group;
index index.html index.htm;
try_files $uri $uri/ /index.html;
}
location /logistics/group/api/ {
proxy_pass http://192.168.31.153:181/;
}
}
Modified configuration
server {
listen 8089;
server_name localhost;
location /logistics/group {
alias ./dist/logistics/group/;
index index.html index.htm;
try_files $uri $uri/ /index.html;
}
location /logistics/group/api/ {
proxy_pass http://192.168.31.153:181/;
}
}
Change points: location is used differently with root and alias.