WordPress keep redirecting my website to port 80

[ad_1]

Hi.

I am trying to setup a reverse proxy for my wordpress server. **Wordpress** is on **server A** and **reverse proxy** is on **server B**.

​

WordPress is running with nginx on port 8080. But whenever I load `http://IPADDRESS:8080`, it will redirect to `http://IPADDRESS`.

I have same setup for another wordpress website and I can load it with port 8080 fine. But this one, it keeps redirecting me to port 80. I have tried disabling all plugins with no luck. Why is this happening?

I have made a lot of searches and majority of them suggesting me to use

define( ‘WP_HOME’, ‘http://IPADDRESS:8080’ );
define( ‘WP_SITEURL’, ‘http://IPADDRESS:8080’ );

The problem is, I am gonna have to deal with URL replacement on proxy server (server B). I have them set to my real domain

define( ‘WP_HOME’, ‘https://MYDOMAIN.com’ );
define( ‘WP_SITEURL’, ‘https://MYDOMAIN.com’ );

So when the website load, all links are fixed to my domain already.

[ad_2]

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer