Linux nginx中不支持代理传递

Linux nginx中不支持代理传递,linux,nginx,nginx-reverse-proxy,nginx-config,Linux,Nginx,Nginx Reverse Proxy,Nginx Config,我是nginx新手,我正在尝试创建干净的URL模式,如果我在浏览器上使用下面的URLhttp://xx.xx.xx.xx:61001/employee“然后它应该路由到”http://localhost:8080/emp/#/details“。但不幸的是,我在浏览器上遇到了404错误。即使我的应用程序已经启动并运行(特殊字符)在nginx中有一些问题。有人能帮我吗 以下是我的配置: location /employee {proxy_pass http://localhost:8080/emp/

我是nginx新手,我正在尝试创建干净的URL模式,如果我在浏览器
上使用下面的URLhttp://xx.xx.xx.xx:61001/employee“
然后它应该路由到
”http://localhost:8080/emp/#/details“
。但不幸的是,我在浏览器上遇到了404错误。即使我的应用程序已经启动并运行(特殊字符)在nginx中有一些问题。有人能帮我吗

以下是我的配置:

location /employee {proxy_pass http://localhost:8080/emp/#/details;
}
在浏览器上获取404错误

这是我的完整服务器配置:

server { 
  listen 8081;
  server_name xx.xx.xxx.xxx;
  location / { root html; index index.html index.htm; }
  location /employee { proxy_pass localhost:8080/emp/#/details; }
  error_page 500 502 503 504 /50x.html;
  location = /50x.html { root html; } 
}

现在您正在侦听端口8081,请将其更改为80

server { 
  listen 80;
  server_name xx.xx.xxx.xxx;
  location / { root html; index index.html index.htm; }
  location /employee { proxy_pass localhost:8080/emp/#/details; }
  error_page 500 502 503 504 /50x.html;
  location = /50x.html { root html; } 
}

你可以回答你的问题,请不要在邮件中发布代码comments@ravisharma这样写怎么样<代码>http://localhost:8080/emp/%23/details@barbsan我曾尝试在代码部分粘贴,但有些编辑器无法编辑我的代码。所以我不得不在评论区贴上一个贴子,让它充满热情。谢谢你的建议。@MostafaHussein我试着用%23代替#,但运气不好。