Hi.
i’m using ansible for installation and upgrading.
My setup has an external nginx running which does the SSL part, so i want to remove the SSL and certbot parts of the
/templates/nginx.conf
file.
(i’m not sure if i have to edit the other nginx_internal.conf
file) But with the below settings i get ‘Bad gateway’.
Hoping someone can point me in the right direction. Thanks
limit_req_zone $binary_remote_addr zone={{domain}}_ratelimit:10m rate=1r/s;
# changelog
# 2023-06-27 Merge remote #5246 and remove certbot and ssl
server {
listen 80;
listen [::]:80;
server_name {{domain}};
location / {
proxy_pass http://0.0.0.0:{{lemmy_port}};
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;
Can you access it directly on
http://0.0.0.0:{{lemmy_port}}
with curl or something from the box itself?502 is can’t reach backend, so either nginx is failing to reach the backend or the backend is not running. Usually the backend’s not running.
Hi. thanks.
i logged in and found the port number in the /etc/sites/sites_enabled/<domain>.conf
i did the merge again, and via domain and the local port i get the following:
i logged into portainer and found this message many times for <domain>_lemmy-ui_1:
in <domain>_lemmy_1 it says this many times:
thread 'main' panicked at 'Failed to load settings file, see documentation (https://join-lemmy.org/docs/en/administration/configuration.html): LemmyError { message: None, inner: "unknown field `use_tls`, expected one of `smtp_server`, `smtp_login`, `smtp_password`, `smtp_from_address`, `tls_type`" near 40:12, context: SpanTrace [] }', crates/utils/src/settings/mod.rs:20:20 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
mm… this
use_tls
field 🤔…On the ansible machine, i have this
use_tls
in the email section ininventory/host_vars/<domain>/config.hjson
. i’ll check if that field is still allowed✅ in the defaults.hjson (mentioned in repy below), the
use_tls
isn’t mentioned, so i removed that keyword, and Lemmy version 0.18 is up🙌Seems this documentation https://join-lemmy.org/docs/administration/configuration.html#full-config-with-default-values is a bit outdated
it refers to
{{#include ../../include/config/defaults.hjson}}
but i couldn’t find
defaults.hjson
except in the lemmy github herehttps://github.com/LemmyNet/lemmy/blob/main/config/defaults.hjson