# Desculpe por outro post sobre Haproxy/Apache porta 80, mas

**URL:** <https://meta.discourse.org/t/sorry-for-another-haproxy-apache-port-80-post-but/83513>\
**Category:** Self-hosting\
**Created:** [21 Março , 2018 20:49 UTC](https://meta.discourse.org/t/sorry-for-another-haproxy-apache-port-80-post-but/83513 "2018-03-21T20:49:05Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![subtenko](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/subtenko/32/119524_2.png) [@subtenko](https://meta.discourse.org/u/subtenko)\
**Post date:** [21 Março , 2018 20:49 UTC](https://meta.discourse.org/t/sorry-for-another-haproxy-apache-port-80-post-but/83513/1 "2018-03-21T20:49:05Z")

</div>

Im going in circles confused for about 1-2 weeks now.

Here’s what Ive done since originally I found port 80 is already in use by apache (I have other sites on the service btw)

1. I tried to run ./discourse-setup as you know but I cant, as you know because the port 80 is taken (there is no app.yml created since I cant install

2. I installed Haproxy and set up the bottom portion of haproxy.cfg like so:

frontend http-in  
bind \*:80  
default\_backend main\_apache\_sites

```
        # Define hosts
        acl host_discourse hdr(host) -i my_site_here.com

        # figure out which one to use
        use_backend discourse_docker if host_discourse

backend main_apache_sites
    server server1 127.0.0.1:8080 cookie A check

backend discourse_docker
    server server2 127.0.0.1:8888 cookie A check

```

1. I set me apache2 sites-available vhost for my\_site\_here.com from port 80 to port :\*8080

2. I edit apaches ports.cfg and change it from port 80 to port 8080

3. I restart both haproxy and apache (I did this port change for another site no using discourse and it loaded minus the CSS being gone which probably has something to do with the site being cloudflare and/or https

**6.** Now when I try ./discourse-setup up instead of a list of ports using 80 its just haproxy now using port 80, but I thought those configurations did the forwarding, so Im confused…what am I missing?

sorry for being a noob ☹

**Update from my last updated post at the bottom:**

After another wasted night, GOSH it was so ridiculous, I realized it was the location of the shared folder in the app.yml location. I have sites installed FIRST and then I added another to be a discourse site. The default app.yml (or what people always post) is the location of a different site file directory structure!

Im so mad at myself for taking this long but I just not got the congratulations page.

Not to sound ungrateful to the people here at discourse but if I or anyone else happens to make time for it, there should totally be a “Tutorial for people/noobs who may have different situations” post. I mean I even gave up on apache and switched to nginx. I was right to do so I believe because from what I read it is easier and better. Man…I really hope I helped someone with this update. Now I gotta hurry and make up for lost time on my projects, but I did it :,)

If this topic helped anyone it would be nice to know.

---

_[View the full topic](https://meta.discourse.org/t/sorry-for-another-haproxy-apache-port-80-post-but/83513)._
