I would like to use nginx as a reverse proxy in front of a Joomla site running on Apache. I would like nginx to handle the SSL connections and relay decrypted traffic through localhost to Apache.

Does Joomla have specific support for this type of configuration, such that I can still have it control which pages should be served over SSL vs. unencrypted connections, or would I have to simply enable SSL across the board for this to work?

1 Answer 1


I'm pulling from non-Joomla SSL proxy experience here. However, I believe it will work.

  1. Configure nginx to send an X-FORWARDED-PROTO header with a value of "https"

    proxy_set_header X-Forwarded-Proto https;
  2. Configure Apache to set the HTTPS environment variable to "on":

    SetEnvIfNoCase X-Forwarded-Proto https HTTPS=on

Once you have those configured, Joomla should be able to figure out what's going on and adjust URLs accordingly.

  • 1
    Nginx dynamic forwarded protocol using variable: proxy_set_header X-Forwarded-Proto $scheme;
    – phiphi
    Jan 7, 2016 at 18:24

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.