Run cloud9 under subdirectory


Is it possible to configure cloud9 to run under a subdirectory, like /cloud9? I’ve searched around but haven’t really found a definitive answer. I tried using nginx with subs_filter to rewrite the HTML, but I still get links to things like /static, for example. Seems like it would be easier if there was a way to change this in the application through a config variable or something.


Not sure what you are asking.


The default is for cloud9 SDK to use the root (ex. http://localhost:80/). I would like to be able to move it to something like http://localhost:80/cloud9.


And now I have this same question. Anyone got an answer?

By the way, I’m sure OP is talking about running the SDK on a home server or some such.


This is what I’ve tried using in my site profile (000-default.conf) so far:

<VirtualHost *:80>
	DocumentRoot /var/www/html


	Redirect /

<VirtualHost *:443>
	SSLEngine On
	SSLCertificateFile    /etc/letsencrypt/live/
	SSLCertificateKeyFile /etc/letsencrypt/live/

	ProxyPreserveHost On
	ProxyPass /c9
	ProxyPassReverse /c9

The strange thing is that when I try going to, I’ll get the login prompt (as I set my SDK server to require credentials) but after entering my creds, it takes me to and gives me a 404 (Page not found) error.


Anyone got any ideas?


No one knows how to change the context path when running the cloud9 sdk server?


it is not possible without changing sdk source code


Thank you.

Guess I’ll be sifting through the source code for a while…


Did you figure out anything?


Personally, I’m just using a subdomain ( It’s quite easier that way.


Hey, could you tell me how to do that? Does this bypass needing a port other than 80/443?


Yes. You’ll only need to forward ports 80/443 on your router. I’m also using PM2 to keep the Node.js server running. It adds a bit of stability. So I’ll start the server with this:

$ pm2 start /home/user/c9core/server.js -- -w ~/workspace/ -l -p 8080 -a user:password
$ pm2 startup systemd

Now the server is running and listening. You can check with pm2 status (if you’re using PM2). You can also verify with netstat -pant | grep 8080. Of course, you can use whatever other port you want.

Now I’m using Nginx for a web server, so I can only give you a config file for that & not Apache. Nginx is being used as a reverse proxy here and it just forwards requests for over to the localhost process that’s listening on port 8080. I could have started the Node.js server to listen only on, but I wanted the option of directly accessing it while I was at home.

server {
        listen 80;
        listen [::]:80;

        root /var/www/html;

        return 301 https://$server_name$request_uri;

server {
        listen 443 ssl;
        listen [::]:443 ssl;

        root /var/www/html;

        include snippets/;
        include snippets/ssl-params.conf;

        location / {

Hope that helps.


Aha. Thanks for the instructions. Unfortunately, unless I’m missing something, still not a solution for shared hosting. 1) I don’t have nginx. 2) I don’t have access to the web server configuration files. and 3) In this scenario, can I still have other other domains on the same server accessible through ports 80/443?

  1. Should work fine for Apache or whatever else you’re using.
  2. Can’t help you there.
  3. Yes, look up virtual hosts for whatever web server you’re using. But if you can’t change the web server configuration, then there isn’t much you can do…