is it wrong that html,ajax at local port 8081 submits a post request to port 8080, and then nginx intercepts the url, at the beginning of demo and forwards it to localhost8080,?
server {
listen 8081;
server_name localhost;
location /demo/{
proxy_pass http://localhost:8080/demo/;
}
}