The wordpress, direct access domain name in the nginx proxy docker will be redirected to the port of wordpress

Environment:
both 1.wordpress and mysql are installed with docker, and the port of wordpress is 8080.
2.nginx is installed directly in utuntu.

problem description:

directly access http://www.zhuyuntao.com and will be redirected to 8080. However, redirection is not configured in nginx.

The configuration of the

/ etc/nginx/sites-available/default file is as follows,

server {
    listen 80;

    server_name www.zhuyuntao.com;

    location / {
        proxy_pass http://127.0.0.1:8080;
        proxy_set_header Host $host;
        proxy_set_header X-Forward-For $remote_addr;
    }
}

Please ask, what"s going on and how to modify it?

Thank you!

Sep.22,2021

try adding

location / {
   ....
   proxy_redirect / /;
}
Menu