# 502 Bad gateway error after switching to SSL

**URL:** <https://meta.discourse.org/t/502-bad-gateway-error-after-switching-to-ssl/43477>\
**Category:** Self-hosting\
**Created:** [Abril 29, 2016, 11:04pm UTC](https://meta.discourse.org/t/502-bad-gateway-error-after-switching-to-ssl/43477 "2016-04-29T23:04:26Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![riking](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/riking/32/170938_2.png) [@riking](https://meta.discourse.org/u/riking)\
**Post date:** [Maio 4, 2016, 12:48am UTC](https://meta.discourse.org/t/502-bad-gateway-error-after-switching-to-ssl/43477/8 "2016-05-04T00:48:52Z")

</div>

Change your proxy pass line to `nginx.http.sock`.

> [@MattCHM](#):
>
> location / {  
> proxy\_pass [http://unix](http://unix):/var/discourse/shared/standalone/nginx.http.sock:;

---

_[View the full topic](https://meta.discourse.org/t/502-bad-gateway-error-after-switching-to-ssl/43477)._
