# להריץ אתרים אחרים באותו מכשיר כמו Discourse

**URL:** https://meta.discourse.org/t/run-other-websites-on-the-same-machine-as-discourse/17247
**Category:** Self-Hosting
**Tags:** how-to, advanced-setup
**Created:** [5 ביולי,‏ 2014,‏ 8:36pm UTC](https://meta.discourse.org/t/run-other-websites-on-the-same-machine-as-discourse/17247 "2014-07-05T20:36:15Z")
**Posts on this page:** 8
**Page:** 4

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [25 ביוני,‏ 2024,‏ 3:38pm UTC](https://meta.discourse.org/t/run-other-websites-on-the-same-machine-as-discourse/17247/471 "2024-06-25T15:38:45Z")

</div>

Yes. The sockets are available outside of the container.

---

<div class="post-metadata">

### Author: ![shawa](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/shawa/32/426315_2.png) [@shawa](https://meta.discourse.org/u/shawa)
#### Post date: [25 ביוני,‏ 2024,‏ 3:57pm UTC](https://meta.discourse.org/t/run-other-websites-on-the-same-machine-as-discourse/17247/473 "2024-06-25T15:57:14Z")

</div>

> [@pfaffman](#):
>
> Yes. The sockets are available outside of the container.

I am using OpenResty, which is running in a container. Do I just need to mount the /var/discourse/shared/standalone directory, where the nginx.http.sock file is stored, into the container?

---

<div class="post-metadata">

### Author: ![lega4](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lega4/32/430878_2.png) [@lega4](https://meta.discourse.org/u/lega4)
#### Post date: [11 ביולי,‏ 2024,‏ 8:54am UTC](https://meta.discourse.org/t/run-other-websites-on-the-same-machine-as-discourse/17247/474 "2024-07-11T08:54:06Z")

</div>

> [@mottosso](#):
>
> Just wanted to share how I accomplished this, it was a little easier than I first thought.
> 
> From an already running machine, with Caddy acting as a reverse proxy for a number of existing Docker containers already.
> 
> 1. Clone discourse as per the official instructions
> 2. Copy `/var/discourse/samples/standalone.yml` → `/var/discourse/containers/app.yml`
> 3. Fill in SMTP settings and website address
> 4. Comment out `443:443` from the `expose:` section
> 5. Replace `80:80` → `3001:80`, 3001 being the port I’m serving via Caddy
> 6. Run `./launcher rebuild app`
> 7. Done

That’s brilliant! This should be the actual “installation guide” and not the page that is currently written as “official”! Thousand thanks!

---

<div class="post-metadata">

### Author: ![Paracelsus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/paracelsus/32/164912_2.png) [@Paracelsus](https://meta.discourse.org/u/Paracelsus)
#### Post date: [7 באוקטובר,‏ 2024,‏ 6:06pm UTC](https://meta.discourse.org/t/run-other-websites-on-the-same-machine-as-discourse/17247/475 "2024-10-07T18:06:47Z")

</div>

A question:

Is the socket template (with nginx.http.sock in the conf file) a must if I want to setup other websites running on the same standalone server along with discourse?

We’ve recently migrated server and we ended up using port 8080 and nginx as reverse proxy but without using the socket template. Since it is working ok and I don’t see the point of using that method I would like to know if there’s no other way.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [7 באוקטובר,‏ 2024,‏ 6:32pm UTC](https://meta.discourse.org/t/run-other-websites-on-the-same-machine-as-discourse/17247/476 "2024-10-07T18:32:45Z")

</div>

If the port works for you then you don’t need the socket. Some people like the socket better for Reasons, but it doesn’t matter much.

---

<div class="post-metadata">

### Author: ![Yahia\_Kala](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/yahia_kala/32/345887_2.png) [@Yahia\_Kala](https://meta.discourse.org/u/Yahia_Kala)
#### Post date: [19 בינואר,‏ 2025,‏ 4:22pm UTC](https://meta.discourse.org/t/run-other-websites-on-the-same-machine-as-discourse/17247/477 "2025-01-19T16:22:25Z")

</div>

This was easy and worked for me. I used port 8080. I am using nginx and since I want to expose the app (along with all my other apps) on port 80 on my host machine, I just added this config file to the sites-available (and symbolically linked to sites-enabled):

```plaintext

server {
    listen 80;
    server_name example.com;

    location / {
        proxy_pass http://localhost:8080;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
}

```

---

<div class="post-metadata">

### Author: ![toeadeep](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/toeadeep/32/488142_2.png) [@toeadeep](https://meta.discourse.org/u/toeadeep)
#### Post date: [23 בפברואר,‏ 2025,‏ 10:56am UTC](https://meta.discourse.org/t/run-other-websites-on-the-same-machine-as-discourse/17247/478 "2025-02-23T10:56:23Z")

</div>

Can u share caddy configuration ?

---

<div class="post-metadata">

### Author: ![itsbhanusharma](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/itsbhanusharma/32/180717_2.png) [@itsbhanusharma](https://meta.discourse.org/u/itsbhanusharma)
#### Post date: [30 ביוני,‏ 2026,‏ 11:19am UTC](https://meta.discourse.org/t/run-other-websites-on-the-same-machine-as-discourse/17247/479 "2026-06-30T11:19:56Z")

</div>

> [@Use Caddy instead of NGINX as your reverse proxy](https://meta.discourse.org/t/use-caddy-instead-of-nginx-as-your-reverse-proxy/54716):
>
> [image] Here are some notes about how I got my test Discourse instance running with [Caddy Server](https://caddyserver.com/). Cool stuff about Caddy: They [use Discourse](https://caddy.community/) smile[Free SSL](https://caddyserver.com/docs/automatic-https) with Let’s Encrypt HTTP2 and [QUIC](https://www.chromium.org/quic) out of the box Easier to configure than nginx Cons: Not as battle tested as apache, nginx and cia. How To Preparing Discourse First, you need to apply this changes to your app.yml: templates: - "templates/postgres.template.yml" - "templates/redis.template.yml" - "templates/web.t…

[Previous page](https://meta.discourse.org/t/run-other-websites-on-the-same-machine-as-discourse/17247.md?page=3)
