Hiya,

I’ve mostly successfully installed lemmy from source, but I’ve got one problem. When going to my lemmy instance /setup to create an admin account, when pressing the button, I get a message saying unexpect doctype html invalid json. I don’t know what I’m doing wrong, I followed the installing from source guide, replacing the ui checkout from git with 0.18.0 rather than 0.16.7 as mentioned in the guide. It seems to me that something is pointing to the ui, rather than the backend, but I cannot see where that might be. Anyone experienced this before? Any help?

Thanks!

-Michael.

  • DocTator
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    ugh, this is getting frustrating. I ran through the installation again just to end up where I ended up in the first place. Here’s my nginx configuration as lemmy.conf … maybe you can see something I don’t…

    upstream lemmy { server lemmydocker.genesis-radio.net:8536; }

    upstream lemmy-ui { server lemmydocker.genesis-radio.net:1234; }

    server { listen 1236; listen 8536; server_name lemmydocker.genesis-radio.net; server_tokens off;

    gzip on;
    gzip_types text/css application/javascript image/svg+xml;
    gzip_vary on;
    
    client_max_body_size 20M;
    
    add_header X-Frame-Options SAMEORIGIN;
    add_header X-Content-Type-Options nosniff;
    add_header X-XSS-Protection "1; mode=block";
    
    location / {
        set $proxypass "http://lemmy-ui";
    
        if ($http_accept = "application/activity+json") {
            set $proxypass "http://lemmy";
        }
        if ($http_accept = "application/ld+json; profile=\"https://www.w3.org/ns/activitystreams\"") {
            set $proxypass "http://lemmy";
        }
        if ($request_method = POST) {
            set $proxypass "http://lemmy";
        }
    
        proxy_pass $proxypass;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    }
    
    location ~ ^/(api|pictrs|feeds|nodeinfo|.well-known) {
        proxy_pass http://lemmy;
        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;
    }
    

    } _`

    I don’t care if people see urls and crap as its a test server and im gonna break it down once I get it fully working anyway. Just doing this to clear up documentation issues. lol