NGINX and SSL

nickbits's picture

Hi All,

I know this is me missing something, so please bear with me. I have been using Apache for years and have decided to take the plunge to Nginx. I have set it up and it works fine. The problem comes when I want to use SSL.

I want to make it so that you have to login via HTTPS and once logged in it keeps you on HTTPS. I have done this under Apache lots of times so didn't think it would be an issue.

Anyway, I created my config files, pointed the browser to https://mysite.com and it worked fine. You enter your login details, and it then goes back to http.

I thought this may be me doing something wrong, so started again with perusio config. That did exactly the same thing. I can't believe that is wrong, so question is, is there something obvious I am missing.

Am happy to post config files if required...

Would appreciate any help or pointers.
Regards,
Nick

Comments

Think I have solved it. I

nickbits's picture

Think I have solved it. I have added:

fastcgi_param HTTPS on;

in a few places on the SSL side. I kind of assumed that it would do that automatically. Guess not.