Nginx Reverse Proxy is a technique used to improve website security and manage web traffic. It involves using the Nginx server as a reverse proxy to hide the web server's actual IP address and balance website traffic across multiple servers, preventing server downtime and ensuring smooth website performance.
You will need two servers. One server is for the Ngnix Reverse proxy. The other server is on which you are hosting your actual WordPress website.
- Install Wordpress on any linux vps
- Be sure, your wordpress website is acceible via ip-address
- Do not redirect your domain: example.com to this wordpress server
- Take ubuntu or any other linux VPS
- Install Ngnix
- Setup Ngnix configuration: nginx.conf (Skip SSL block)
- Point your domain to this Ngnix server More Info
- Install SSL via Let's Encrypt built-in cert-bot: Free SSL/TLS certificates
define('WP_HOME', 'http://example.com');
define('WP_SITEURL', 'http://example.com');
define('FORCE_SSL_ADMIN', true);
if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https') {
$_SERVER['HTTPS'] = 'on';
}
$_SERVER['HTTPS'] = 'On';