How to specify a different port (not 80) during installation?


#1

I am installing this on the production server, which I already have a website running on port 80.

How do I specify a different port to install Discourse?

Currently it won’t let me install and says:

# ./discourse-setup
Port 80 appears to already be in use.

If you are trying to run Discourse simultaneously with another web
server like Apache or nginx, you will need to bind to a different port

See https://meta.discourse.org/t/17247

However the above link says “assumes you already have Discourse working”, but I don’t.


(Matt Palmer) #2

Yes, that does appear to be something of a chicken-and-egg problem… what the discourse-setup script does, more-or-less, is just copy samples/standalone.yml to containers/app.yml and edit a bunch of stuff in response to your answers to a bunch of questions. You can do the same thing yourself – copy the file, edit to suit. It’s how all installs used to be done before @codinghorror decided he wanted to show he could write bash scripts with the best of 'em. :grinning:


(Rafael dos Santos Silva) #3

Just bear in mind that running on a different port that 80 and 443 isn’t really supported, and there will be some things broken.

If you really need to reuse the server you can set nginx in front to proxy request between discourse and he other site. There’s an #howto for that.


Starting a second Discourse forum on the same VPS
#4

Thank you for the answers!