My Server Env for a wordpress site is as follows:

----------               ---------              -------------
| Client | <-- HTTPS --> | Proxy | <-- HTTP --> | Wordpress |
----------               ---------              -------------

The Problem is that the Wordpress Site itself is served internally over HTTP but the Client communicates over HTTPS with the Proxy. Since Wordpress is configured with HTTP it returns links and images-src with "http://" which leads to mixed-content errors in the browsers. (Eg. all css / script links generated by wp_head() return http:// urls)

Can i configure Wordpress to generate only "https://" urls, even if it's serverd over HTTP?

Wordpress runs on nginx webserver
The Proxy is also nginx

2 Answers 2


Please take a look at Administation Over SSL, particularly the "Using a Reverse Proxy" section.

  • This is correct. define( 'FORCE_SSL_ADMIN', true ); + $_SERVER['HTTPS'] = 'on'; works right away.
    – hrvoj3e
    Feb 1 at 13:03

What about using a Force SSL plugin like this one?

  • I don't think that'll work in a proxy scenario. That's for wordpress forcing SSL content. In this scenario, wordpress sees no encryption. Jul 19, 2018 at 21:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.