In DNS management proxy status on appended port 80 to url

In DNS management section. when proxy status is turn on. Then all app redirect url appended port 80 in domain. If proxy is off then its working correctly.

When proxy is on . all redirect url For eg. https://example.com/abc/xyz redirected to https://example.com:80/abc/xyz

I have used nginx for reverse proxy.

Looking for help.

Nginx

server {
listen 80;
server_name example.com www.example.com;

return 302 https://$server_name$request_uri;

}

server {

# SSL configuration
listen 443;

ssl_certificate    /etc/ssl/example/cert.pem; 
ssl_certificate_key    /etc/ssl/example/key.pem;
ssl_client_certificate         /etc/ssl/cloudflare.crt;

server_name example.com www.example.com;

root /var/www/example/html;
index index.html index.htm index.nginx-debian.html;

location / {
        #try_files $uri $uri/ =404;
    proxy_pass http://localhost:8080;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection 'upgrade';
    proxy_set_header Host $host;
    proxy_cache_bypass $http_upgrade;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
    
}

}

Thanks

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.