Greenlight: Can't redirect http to https

Created on 27 Apr 2020  路  8Comments  路  Source: bigbluebutton/greenlight

I can't manage to get http redirected to https in the Nginx configuration.
I added return 301 https://$host$request_uri; in /etc/nginx/sites-available/default, as I usually do, but it doesn't work.
I've found severals nginx configuration files in /etc/bigbluebutton/nginx/ but I'm not comfortable editing them.

Can somebody point me the way ?

Most helpful comment

If you just want to force HTTPS, uncomment the # ENABLE_SSL=true line from the .env and restart Greenlight

All 8 comments

Don't asked why :) This works for me -> /etc/nginx/site-enabled/bigbluebutton

server {
listen 80;
listen [::]:80;
server_name DOMAIN;
location ^~ /.well-known/acme-challenge/ {
root /var/www/bigbluebutton-default/;
}
location / {
return 301 https://$host$request_uri;
}
}
server {
server_name DOMAIN;
listen 443 ssl;
listen [::]:443 ssl;

So if I understand correctly, you separate the http and https servers in 2 blocks, the http block comprising the redirection order. I am right ? The end of the file staying the same, with all the ssl, locations, error pages etc ?

yep.

If you just want to force HTTPS, uncomment the # ENABLE_SSL=true line from the .env and restart Greenlight

Thank you @farhatahmad I don't know why I'm always forgetting looking into this file.
Perfectly working, now.

If you just want to force HTTPS, uncomment the # ENABLE_SSL=true line from the .env and restart Greenlight

Hello @farhatahmad,
I have uncommented ENABLE_SSL=true and restarted the Greenlight but I am still unable to get this working for me. What am I missing here? I am not comfortable with messing Nginx files.

@mbile, if you running docker-compose you have run "docker-compose down" then run "docker-compose up -d" then only greenlight container will pick the change .env file.

you can verify this by running this command: docker inspect greenlight-v2 | grep ENABLE_SSL

@farhatahmad
I did what you said. then i use "docker-compose down" and "docker-compose up -d".
but still with www url i see default nginx page.
link:
croom

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ffdixon picture ffdixon  路  4Comments

bvdlingen picture bvdlingen  路  3Comments

saihaj picture saihaj  路  3Comments

lakano picture lakano  路  4Comments

ffdixon picture ffdixon  路  3Comments