Thanks for this thread, I am running into the exact same issue. Did you end up figuring it out? I have my security settings set exactly like Auryn’s but I still cannot connect to the discourse server even though it seems to be running fine in Ubuntu 16.
I think the cause was with Nginx failing to locate the SSL certificate, because one was not generated by Let’s Encrypt due to the hostname not resolving to that server.
Have you tried the troubleshooting steps I posted above?
I tried most of the steps, let me recap:
telnet IPADDRESS 80
telnet IPADDRESS 443
both give back ‘unable to connect’ messages. I can ssh in with no issues. My security groups match what was suggested:
The outbound side is the default which is all
Running ps aux | grep -i nginx
gives:
root 7288 0.0 0.0 4244 1152 ? Ss 16:22 0:03 runsv nginx ubuntu 19278 0.0 0.0 12944 888 pts/2 S+ 17:42 0:00 grep --color=auto -i nginx
Running telnet localhost 443
Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. Connection closed by foreign host.
My ufw is disabled
I wonder if the problem is a similar one with let’s encrypt. I use name cheap as my domain provider and I added:
Type: A Record
Host: community
IP: IPADDRESS
TTL: 1 minute
My error when I go to my community.domain.com does appear to be the same as IPADDRESS through a web browser. That should be all that is needed on the namecheap side, right? If I go to an IP checker website, it does correctly point from community.mydomain.com to the right AWS Elastic IP. Thanks again!
Ha, I got it! Your tip about let’s encrypt was correct. Once I reran the set up after namecheap had a chance to point from my domain to my IP address, everything worked perfectly.
Thanks again!
Oh crap, is that all it was! lol. I still hadn’t fixed this (sorry for dropping off the map @DanielMarquard, got busy with other stuff).
Will have a crack at it tonight.
@auryn_macmillan haha your response is amazing! Two other errors that I had to deal with just in case you run into it too, is that with the automatic setup , the DISCOURSE_SMTP_PASSWORD
is put in quotes automatically while other variables in that block do not have the quotes. I removed those quotes to match.
Also, my admin email was admin@mydomain.com, while discourse by default expects in my case admin@community.mydomain.com (based on DISCOURSE_HOSTNAME
). If you go down to the second to last line you can uncomment this line and fill in your details:
- exec: rails r "SiteSetting.notification_email='admin@mydomain.com'"
Then when you go to configure the site, it will properly send you the email you need to get started. That step is only necessary if the total domain of your website differs from your email. Good luck and thanks everyone for getting this conversation started.
Glad that fixed it for you.
@DanielMarquard & @CaptainChemist thanks for the help! Finally got my server migrated over to AWS and everything seems to be working a treat.