• The site is running apache locally, with an nginx reverse proxy between it and the client, configuration in the wp-config.php is as follows:

    
    if (!empty($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https') {
            $_SERVER['HTTPS'] = 'on';
    }
    

    my Nginx reverse proxy config (omitting the SSL config but here the location block), is as follows:

    
    location / {
        proxy_pass https://10.8.40.57;
        proxy_set_header X-Forwarded-Proto https;
        proxy_set_header X-Forwarded-Port 443;
      }
    

    I’m running into the site serving “There has been a critical error on your website.” which leads me to beleive that I did something wrong in the wp-config.php part, as this error appears regardless if I try and access the site through either direct IP or via reverse proxy. I’ve been unable to find better documentation on configuring the reverse proxy in wordpress properly, guidance and support much appreciated!

Viewing 1 replies (of 1 total)
  • Moderator t-p

    (@t-p)

    Try manually resetting your plugins (no Dashboard access required). If that resolves the issue, reactivate each one individually until you find the cause.

    If that does not resolve the issue, access your server via SFTP or FTP, or a file manager in your hosting account’s control panel, navigate to /wp-content/themes/ and rename the directory of your currently active theme. This will force the default theme to activate and hopefully rule-out a theme-specific issue (theme functions can interfere like plugins).

Viewing 1 replies (of 1 total)
  • The topic ‘Nginx Reverse Proxy Causing “a critial error”’ is closed to new replies.