lemmy.world should redirect to https (secure) site

overby@lemmy.world to Lemmy.World Announcements@lemmy.world – 1 points –

When you visit http://lemmy.world it should redirect to https://lemmy.world - at least the login page should be secure.

3

Hmm , when I replace this:

http {
  server {
    listen 80;
    server_name lemmy.world;

    location / {
        proxy_pass http://lemmy-ui:1234;
        proxy_set_header Host $host;
    }
}

with this:

http {
  server {
    listen 80;
    server_name lemmy.world;

    location / {
        return 301 https://$host$request_uri;
    }
}

it breaks, gives 502 when visiting the site...

ideas? (I'm not that much into nginx...)

Can we get an error log? If no, are you seeing any timeouts in there?