# How can I enable SSL while running on a different port + Issue with subdomain

**URL:** <https://meta.discourse.org/t/how-can-i-enable-ssl-while-running-on-a-different-port-issue-with-subdomain/44646>\
**Category:** Self-hosting\
**Created:** [23 مايو 2016، 2:52ص UTC](https://meta.discourse.org/t/how-can-i-enable-ssl-while-running-on-a-different-port-issue-with-subdomain/44646 "2016-05-23T02:52:53Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![fefrei](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fefrei/32/119538_2.png) [@fefrei](https://meta.discourse.org/u/fefrei)\
**Post date:** [23 مايو 2016، 6:12م UTC](https://meta.discourse.org/t/how-can-i-enable-ssl-while-running-on-a-different-port-issue-with-subdomain/44646/4 "2016-05-23T18:12:43Z")

</div>

> [@Daffy\_Chu](#):
>
> I kept on rebuilding my discourse it said that it’s installing under /var/www/discourse/public/ but when I navigated into the folder, I don’t see anything that has to do with discourse. or am I looking at the wrong place for the website?

Yes, you are: Discourse is running inside its Docker container. All data is kept in `/var/discourse`. If you need to, you can enter the container with `./launcher enter app`, but you normally shouldn’t need to. Also, you should keep in mind that you shouldn’t change the container as all changes will be lost on rebuilding.

> [@Daffy\_Chu](#):
>
> Would you possibly have any idea on the sub domain part?

I’ve never user Cpanel or HAProxy before, so I cannot help you directly (I use nginx as my front-end server). I just have some general guidelines:

- Cpanel should have nothing to do with Discourse, except that you want to host it on the same server as Discourse.
- All SSL should be handled by HAProxy.
- The DNS for the subdomain you use for Discourse must point at your server.
- If DNS is correct, but nothing from Discourse shows up at the subdomain, it is most likely a configuration problem with HAProxy (which is not redirecting the requests to Discourse correctly).

---

_[View the full topic](https://meta.discourse.org/t/how-can-i-enable-ssl-while-running-on-a-different-port-issue-with-subdomain/44646)._
