Run PHP app on custom port


#1

I don’t want to kill my app on port 8080. How can I change the port of Cloud9 for my PHP app instead of using 8080 for webserver?


Process already running on port
#2

Cloud9 only makes 8080, 8081, and 8082 available publicly so you’ll need to use one of those. For more info, see Multiple Ports.


#3

This is not the answer on my question. Where can I change the default port number to 8081 in this case. If I pressed ‘run’ within a PHP script, it starts the PHP (build-in server) on port 8080. I couldn’t change that.

Currently I changed the plugins/c9.ide.run/run.js manually. Because port 8080 was already in use on my server, I changed it to 8182. As you said, it’s not publicly available (it doesn’t matter… because I’m running my own Nginx server). I added a pass proxy line to localhost:8182, and voila it’s working. Too bad I needed to change the run.js manually.


#4

@danger89 You didn’t give us enough detail to understand what exactly you are trying to do. You almost certainly do not need to change run.js.


#5

You can change it by editing these files. /etc/apache2/sites-enabled/001-cloud9.conf and the listen port in /etc/apache2/ports.conf then restart apache.