microsoft / oxa-tools

Open edX on Azure Tools
MIT License
36 stars 103 forks source link

Force HTTPS by creating a redirect from HTTP to HTTPS #365

Closed Trainocate closed 6 years ago

Trainocate commented 6 years ago

Hi Elton,

Good Day!! We have deployed the OpenEdx Ficus version successfully and the site is up in running, but we are not able to redirect http to https, where we been doing the configurations in the file lms which falls under following path /edx/app/nginx/sites-available. "server { listen 80; return 301 https://$host$request_uri; }" We are still not able to redirect all the http traffic to the https , Could you please help us resolve this issue or suggest something for us to sort out this.

eltoncarr commented 6 years ago

If you've followed our deployment guide, you'd need to do nothing extra. This is automatically taken care of.

Trainocate commented 6 years ago

Hi Elton, Thank you for your response, Could you please let us know on which location,path and file we need to check for this functionality.Please suggest us some work around that we will be able to resolve it.

Trainocate commented 6 years ago

Hi Elton,

Any update on the above??

egonid commented 6 years ago

Hi Trainocate

As I know that the default value for https(ssl) is true with below option.

(in bvt.sh file)

NGINX_ENABLE_SSL=True NGINX_SSL_CERTIFICATE="/oxa/oxa-tools-config/env/${ENVIRONMENT}/cert.crt" NGINX_SSL_KEY="/oxa/oxa-tools-config/env/${ENVIRONMENT}/cert.key"

So, If you would deploy a site with oxa-tools and ssl certificate, the site will be accessed by https.

Anyway, I hope that below link may help you.

https://github.com/CDOT-EDX/ProductionStackDocs/wiki/Configuring-SSL-for-NGINX

Thanks

btelnes commented 6 years ago

Hi Trainocate

You can check /edx/app/nginx/sites-available/lms for this functionality.

Trainocate commented 6 years ago

Hi,

Thanks for response, we have already tried the link which you have mentioned above, we have configured these below lines in the lms file which you have asked to update. "server { listen 80; return 301 https://$host$request_uri; }"

But when we load our site with http it is not redirecting to https. Please let us know what could be the issue.