Limiting/forcing single hostname in a setup alongside multiple (Apache served) sites


#1

Hi there! Thanks to all your help here I managed to get discourse working alongside multiple sites served by Apache. When visiting foo.com the request is forwarded to port 8080, just like this.

But when a client request my other sites on port 8080, Discourse is now also served (e.g. at bar.com:8080). I’ve set DISCOURSE_HOSTNAME: foo.com in app.yml, but this doesn’t seem to be enforced by Docker. Any ideas on how to limit access from the web to my Discourse installation, only for clients requesting foo.com?


(Sam Saffron) #2

plenty of ways to restrict access to port 8080…

iptables, having docker export eg:

expose: 127.0.0.1:8080:80

#3

Thank you for the quick reply Sam. I didn’t know expose allowed for further specifications. I’ll give it a go :slight_smile: