souljacker is having trouble accessing their Discourse installation through Apache. They have set DISCOURSE_HOSTNAME: 'forum.mysite.com' in their app.yml, but can only access Discourse by visiting mysite.com:8080.
elberet explains that this is because only one process can listen to a port, and Apache is already using port 80. To resolve this, elberet recommends configuring Apache to proxy requests to Discourse, using a setup like the one they posted here.
souljacker tries to create a virtual host in Apache, but ends up with Apache’s default page. elberet advises exposing a different port in app.yml and using the provided config snippet to proxy into the container. They also emphasize the importance of understanding server administration.
This question has been asked quite a number of times already…
Basically, only one process can listen to a port, and there’s only a single port for incoming HTTP traffic. This means it’s impossible to run two webservers alongside each other, instead you must configure at least one of them to proxy requests through to the other. Since you have manual control over the Apache running on the host, that’s what you’ll need to work with.
I’ve posted my Apache config here and there’s also a discussion on how to set up Apache so that it can handle long polling. (You MUST use the evented MPM or performance will be terribad!)
(See also this snippet that shows how to overlay something over Discourse’s namespace via the Apache frontend.)
No, you should expose "127.0.0.1:4000:80", then use the config snippet I’ve linked to and proxy into the container.
Let me repeat: you can not run Discourse on port 80 while another webserver is running on your host system. It’s simply not possible.
As for Apache’s default page appearing, did you wrap that block in a <VirtualHost> block? For Apache 2.2: did you enable name-based virtual hosting?
Also, and I cannot stress this enough, if you’re going to be a server admin, you should understand what you’re doing or you’re going to put yourself and your users at risk. Be responsible and RTFM. (Read The F…riendly Manual)