Hello, I’m trying to install discourse for the first time on a DigitalOcean Linux VPS. This VPS is running multiple sites on Nginx and I followed the tutorial on how to install discourse on multiple sites here: Running other websites on the same machine as Discourse - #182 by angus
Discourse installed and ran fine. But when I make an admin account I never receive an email. I followed this tutorial: crunchify[dot]com/how-to-setup-email-for-discourse-forum-with-google-apps-smtp-relay-right-way/
My server uses postfix to relay emails to Google G Suite and works fine with WordPress and MyBB. Though, the tutorial above does not mention postfix and I assume it directly connects to Google G Suite.
I followed this guide on how to troubleshoot email problems: meta.discourse[dot]org/t/troubleshooting-email-on-a-new-discourse-install/16326
I can telnet to the smtp relay:
$ sudo telnet smtp-relay.gmail.com 587 Trying 2607:f8b0:400d:c04::1c... Connected to smtp-relay.gmail.com. Escape character is '^]'. 220 smtp-relay.gmail.com ESMTP n18sm708840ooi.26 - gsmtp
The production log says:
Rendering layouts/email_template.html.erb Rendered layouts/email_template.html.erb (Duration: 0.1ms | Allocations: 32) Delivered mail firstname.lastname@example.org (610.1ms) Job exception: end of file reached Rendering layouts/email_template.html.erb Rendered layouts/email_template.html.erb (Duration: 0.2ms | Allocations: 32) Delivered mail email@example.com (261.1ms) Job exception: end of file reached
I tried setting the email in the app.yml configuration file to firstname.lastname@example.org because I know that email works, but it’s the same thing. It still sends emails with those numbers, I assume it’s some kind of encryption? They never arrive in my inbox.
My other issue is with nginx. It was working fine just yesterday but today I messed around with the app.yml configuration file and set the URL to be a subdirectory instead of a subdomain.
I just wanted to see if maybe the subdomain is causing the issue with the email not working because my current forum, MyBB, runs in a subdirectory and has no issues with email.
Doing this seems to have broken nginx. For whatever reason, nginx now attempts to load an SSL certificate from the discourse directory even though it’s not specified in my nginx configuration file. Here’s the error:
$ sudo nginx -t nginx: [emerg] BIO_new_file("/var/discourse/shared/standalone/ssl/ssl.crt") failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/var/discourse/shared/standalone/ssl/ssl.crt','r') error:2006D080:BIO routines:BIO_new_file:no such file) nginx: configuration file /etc/nginx/nginx.conf test failed
I’m using Let’s Encrypt for the SSL certificate and it’s working fine. Nginx had no issues yesterday prior to me trying to run discourse in a subdirectory instead of a subdomain.
Any help would be appreciated.