Nginx has two slashes after configuring the reverse proxy domain name

configure the reverse proxy with nginx. After the configuration is redirected, the domain name becomes like this http://oa.localhost.com// force proxy pass http://172.168.0.224:60000/c6 novice is in trouble. Is there any big guy to help analyze the problem

Mar.18,2021

I came across it, too. Have you solved it?


I didn't solve it either.


tools are currently used to address the needs of front-end agents, which can be tested if necessary. The name of the software is fikker, Free Edition, which is suitable for daily use.


should be you configured to point the root directory to a subdirectory under the root directory of the backend server. This situation like

location / {
  proxy_passhttp://192.168.1.6/admin;
}

may lead to infinite redirection. Chrome will prompt for too many redirects for the first time, which may be opened after a while, but the URL of the browser address bar is followed by a double slash. For example, http://www.somesite.com//
simply add / (as follows) to the subdirectory of the backend server and then reload it ( nginx-s reload )

location / {
  proxy_passhttp://192.168.1.6/admin/;
}

if this situation still occurs after refreshing, it is usually caused by the browser cache, try to clear the cache or change other browsers, and the url in the address bar will be normal. As follows:
http://www.somesite.com


have you solved your problem? I have the same problem

Menu