# An error occurs when building Discourse over HTTP

**URL:** <https://meta.discourse.org/t/an-error-occurs-when-building-discourse-over-http/344396>\
**Category:** Self-hosting\
**Created:** [December 26, 2024, 11:15am UTC](https://meta.discourse.org/t/an-error-occurs-when-building-discourse-over-http/344396 "2024-12-26T11:15:34Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![MihirR](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mihirr/32/475158_2.png) [@MihirR](https://meta.discourse.org/u/MihirR)\
**Post date:** [December 27, 2024, 4:44am UTC](https://meta.discourse.org/t/an-error-occurs-when-building-discourse-over-http/344396/2 "2024-12-27T04:44:04Z")

</div>

The error happens because Nginx is still looking for an SSL certificate, but your ALB is handling the SSL. Here’s how to fix it:

1. **Check your `app.yml`:** It looks like you’ve already disabled SSL templates, so you can skip this.

2. **Rebuild Discourse:** Run `./launcher rebuild app` to apply the changes.

3. **Check Nginx settings:** Inside the container, look at the Nginx config and make sure there are no SSL lines (`ssl_certificate`, `ssl_certificate_key`). If you find any, remove them and restart Nginx with `sv restart nginx`.

4. **Verify your ALB setup:** Make sure your ALB is terminating SSL on port 443 and forwarding HTTP (port 80) to your EC2.

That should stop Nginx from looking for the SSL certificate, and everything should work fine over HTTP!

---

_[View the full topic](https://meta.discourse.org/t/an-error-occurs-when-building-discourse-over-http/344396)._
