this post was submitted on 25 Jun 2023
4 points (100.0% liked)

Lemmy Support

4652 readers
1 users here now

Support / questions about Lemmy.

Matrix Space: #lemmy-space

founded 5 years ago
MODERATORS
 

I've followed the Install from Scratch instructions on the Lemmy docs, and everything seems to have worked until I get to the nginx setup. Upon opening the instance URL in the browser, it shows me a JSON rather than the lemmy-ui.

It seems to be only setting up the port for the lemmy_server but not the UI? But I have no idea how to fix that

Here is the nginx lemmy.conf that was generated:

limit_req_zone $binary_remote_addr zone=lemmy.edgeburnmedia.com_ratelimit:10m rate=1r/s;

server {
    listen 80;
    listen [::]:80;
    server_name lemmy.edgeburnmedia.com;
    location /.well-known/acme-challenge/ {
        root /var/www/certbot;
    }
    location / {
        return 301 https://$host$request_uri;
    }
}

server {
    listen 443 ssl http2;
    listen [::]:443 ssl http2;
    server_name lemmy.edgeburnmedia.com;

    ssl_certificate /etc/letsencrypt/live/lemmy.edgeburnmedia.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/lemmy.edgeburnmedia.com/privkey.pem;

    location / {
      proxy_pass http://0.0.0.0:8536;
      proxy_http_version 1.1;
      proxy_set_header Upgrade $http_upgrade;
      proxy_set_header Connection "upgrade";
      proxy_set_header X-Real-IP $remote_addr;
      proxy_set_header Host $host;
      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    }
}

access_log /var/log/nginx/access.log combined;
top 4 comments
sorted by: hot top controversial new old
[–] gareth@lemmy.gareth.computer 3 points 1 year ago (1 children)

Take a look at the config from docker (https://github.com/LemmyNet/lemmy/blob/main/docker/nginx.conf). It proxies to either the frontend or the server based on the request headers/method/path etc.

[–] Edgeburn02@sh.itjust.works 1 points 1 year ago

Something similar to this is how I ended up getting the UI to show, I'm now having another issue but I believe its due to a version mismatch between the backend and UI, as well that I only did /api

[–] Edgeburn02@sh.itjust.works 2 points 1 year ago

lets see if this will show up