- Domain configuration completed
- AWS EC2 instance created
- Certificate issued using ACM
- Configured 443 and connected the certificate via ALB
- ALB routes domain traffic to the EC2 instance on port 80
Before building Discourse, I modified the app.yml
file to configure HTTP connections:
templates:
- "templates/postgres.template.yml"
- "templates/redis.template.yml"
- "templates/web.template.yml"
## Uncomment the next line to enable the IPv6 listener
#- "templates/web.ipv6.template.yml"
- "templates/web.ratelimited.template.yml"
## Uncomment these two lines if you wish to add Lets Encrypt (https)
#- "templates/web.ssl.template.yml"
#- "templates/web.letsencrypt.ssl.template.yml"
## which TCP/IP ports should this container expose?
## If you want Discourse to share a port with another webserver like Apache or nginx,
## see https://meta.discourse.org/t/17247 for details
expose:
- "80:80" # http
#- "443:443" # https
After making the changes, I built Discourse and checked the configuration, but nginx keeps requesting an SSL key with the following error:
[emerg] 7416#7416: cannot load certificate "/shared/ssl/discourse.xxxxxxx.com.cer": PEM_read_bio_X509_AUX() failed (SSL: error:0480006C:PEM routines::no start line:Expecting: TRUSTED CERTIFICATE)
Is there a way to prevent nginx from attempting to load the key or to make nginx work properly over HTTP?