saint

joined 3 years ago
MODERATOR OF
 

In retrospect it seems obvious ;)

 

Could be fun ;)

5
SSH over HTTPS (trofi.github.io)
 

sometimes i see this in "very secured" servers as well. so check web configs, especially if you takeover the server management from somebody else ;)

 

iPhone attack

 

Could have saved me tons of time (if I knew about it earlier)

[–] [email protected] 1 points 1 year ago (3 children)

you can define it as environment variables in https://github.com/LemmyNet/lemmy-ansible/blob/main/templates/docker-compose.yml i.e mine contains these lines:

  postfix:
    image: mwader/postfix-relay
    environment:
      - POSTFIX_myhostname=group.lt
      - POSTFIX_inet_protocols=ipv4
      - POSTFIX_smtp_sasl_auth_enable=yes
      - POSTFIX_smtp_sasl_password_maps=static:smtp_username:smtp_password
      - POSTFIX_smtp_tls_security_level=may
      - POSTFIX_smtp_sasl_security_options=noanonymous
      - POSTFIX_relayhost=sendgridsmtpserver:serverport
      - OPENDKIM_DOMAINS=group.lt
    restart: "always"
[–] [email protected] 1 points 1 year ago (5 children)

you should be able to use any mail gateway that supports smtp. one way to do it is to configure postfix to use sendgrid as relayhost - https://docs.sendgrid.com/for-developers/sending-email/postfix

[–] [email protected] 0 points 1 year ago (11 children)

from the log it seems that lemmy cannot reach https://midwest.social/ - if you have more such operation timed outs - probably there is some networking issue with outgoing requests - maybe you have some kind of firewall? i can reach your instance from other direction: https://group.lt/c/[email protected]

probably the easiest way to setup lemmy and another front facing reverse proxy is to use nginx that comes with lemmy on another port and setup simple reverse proxying with NPM to it. i myself using caddy for reverse proxying, using this config: https://join-lemmy.org/docs/en/administration/caddy.html

[–] [email protected] 0 points 1 year ago (14 children)

okay, i don't know how npm works, could you check this tutorial to see if you have set it up similarly?

https://youtu.be/6lQFZvCCe7U

also - check docker-compose.yml settings to remove port for lemmy host and i think you need to set use https to true as it is provided by npm

[–] [email protected] 0 points 1 year ago (16 children)

try to look here for the config file:

include /etc/nginx/conf.d/*.conf;
	include /data/nginx/default_host/*.conf;
	include /data/nginx/proxy_host/*.conf;
	include /data/nginx/redirection_host/*.conf;
	include /data/nginx/dead_host/*.conf;
	include /data/nginx/temp/*.conf;

btw, i think port in lemmy.bulwarkob.com:1236 in docker-compose is not needed for you, should be just lemmy.bulwarkob.com

[–] [email protected] 0 points 1 year ago* (last edited 1 year ago) (18 children)

yeah, nginx config for lemmy is not very straighforward. you need to mimic this:

worker_processes  1;
events {
    worker_connections  1024;
}
http {
    upstream lemmy {
        server "lemmy:8536";
    }
    upstream lemmy-ui {
        server "lemmy-ui:1234";
    }
    server {
      listen       1236;
      server_name  localhost;

      # frontend
      location / {
        set $proxpass "http://lemmy-ui";
        if ($http_accept = "application/activity+json") {
          set $proxpass "http://lemmy";
        }
        if ($http_accept = "application/ldr+json; profile=\"https://www.w3.org/ns/activitystreams\"") {
          set $proxpass "http://lemmy";
        }
        if ($request_method = POST) {
          set $proxpass "http://lemmy";
        }
        proxy_pass $proxpass;

        rewrite ^(.+)/+$ $1 permanent;

        # Send actual client IP upstream
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
      }

      # backend
      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";

        # Add IP forwarding headers
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
      }
    }
}

also - can you check if all containers are running? just do docker-compose ps in the lemmy dir.

[–] [email protected] 0 points 1 year ago* (last edited 1 year ago) (20 children)

it seems there is no config for lemmy nginx here.. might be in other files?

[–] [email protected] 0 points 1 year ago (22 children)

nginx config and lemmy.hjson would be useful as well

[–] [email protected] 0 points 1 year ago (24 children)

hi, can you post your docker-compose.yaml, nginx config and screenshots/logs of failures?

view more: ‹ prev next ›