I actually just caught onto that shortly before your reply. I kept researching
and messing around with the nginx config, reviewing tons of examples online,
and I started to get a creeping hunch that it probably isn't the nginx config
that's been the problem, which may be why I've been confused about re-writing
the config exactly the way it had been back when I briefly had it working, and
yet I couldn't get it to work again. I finally caught a sogod error in running
"systemctl status sogo," and so now I'm aware it isn't the nginx config, but
sogo isn't actually running properly, and now I've turned my attention toward
figuring out why. It appears that the sogod service is running, but with the
following error:
Oct 08 01:44:55 host.{REDACTED}.{TLD} systemd[1]: Starting sogo.service - LSB:
SOGo server...
Oct 08 01:44:56 host.{REDACTED}.{TLD} sogo[11780]: * Starting SOGo sogo
Oct 08 01:44:56 host.{REDACTED}.{TLD} sogo[11851]: 2025-10-08 01:44:56.073
sogod[11851:11851] File NSDictionary.m: 671. In -[NSDictionary
initWithContentsOfFile:] Contents of file '/etc/sogo/sogo.conf' does not
contain a dictionaryOct 08 01:44:56 host.{REDACTED}.{TLD} sogo[11851]:
<0x0x560409ae2410[SOGoStartupLogger]> Cannot read configuration from
'/etc/sogo/sogo.conf'. Aborting
Oct 08 01:44:56 host.{REDACTED}.{TLD} sogo[11780]: ...done.
Oct 08 01:44:56 host.{REDACTED}.{TLD} systemd[1]: Started sogo.service - LSB:
SOGo server.
I'm not really sure what's meant by the lack of a dictionary (looking over the
documentation on how to setup sogo.conf, I don't think I'm missing any of the
really important config values, although it's possible I've misconfigured one
or two of them. I double-checked that the sogo user has permissions to access
the config file, with 0755 sogo:sogo perms on /etc/sogo and 0644 sogo:sogo
perms on /etc/sogo/sogo.conf. Despite having the debug values enabled in
sogo.conf, no info is getting logged to /var/log/sogo/sogo.log (that only seems
to happen when sogod runs properly). And I have no idea what I did the other
day that broke my ability to connect (I assumed the entire time that I had an
incorrect nginx config), so I'm not really sure how to troubleshoot this
problem beyond what I've already checked. So now this thread has turned into a
sogod troubleshooting attempt rather than an nginx one.
--
Secured with Tuta Mail:
https://tuta.com/free-email
Oct 8, 2025, 03:05 by [email protected]:
> 08.10.25, 04:02 +0200, gluonman ([email protected]):
>
>> The error appearing in /var/log/nginx/{REDACTED}.{TLD}/webmail/error.log:
>> 2025/10/07 20:53:57 [error] 923#923: *3 connect() failed (111:
>> Connection refused) while connecting to upstream, client: {REDACTED},
>> server: mail.{REDACTED}.{TLD}, request: "GET / HTTP/1.1", upstream:
>> "http://127.0.0.1:20000/ <http://127.0.0.1:20000/>", host: "{REDACTED}"
>>
>> The error appearing in my web browser when attempting to visit the site:
>> Error code: 502 Bad Gateway
>>
>
> Looks like sogod simply isn't running. Check why / start it.
>
> --
> Regards
> mks
>