nginx mapping problem
習慣沉默
習慣沉默 2017-05-16 17:22:16
0
2
538

I built a 5000 port service a under the server with the domain name xx.com.
I want to do a layer of mapping through nginx
Map http://xx.com/a to xx.com :5000,

nginx conf is written like this

location /a{
    rewrite ^/a/(.*)/ break
    access_log off;
    proxy_pass http://127.0.0.1:5000
}

The current problem is that entering http://xx.com/a/ can be mapped correctly
but http://xx.com/a cannot. Please tell me how to modify it

習慣沉默
習慣沉默

reply all(2)
过去多啦不再A梦
rewrite ^/a(.*)/$1 break
伊谢尔伦

Maybe it can be purple

location /a{
    rewrite ^/a(/|?|#|$)(.*)/ break
    access_log off;
    proxy_pass http://127.0.0.1:5000
}
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template