Skip to content

Instantly share code, notes, and snippets.

@wake
Last active December 18, 2015 22:08
Show Gist options
  • Save wake/5852204 to your computer and use it in GitHub Desktop.
Save wake/5852204 to your computer and use it in GitHub Desktop.
Build Cloud9 on Linode CentOS 6.3 x64

Cloud9 Installation (Linode CentOS 6.2 x64)


Use Nginx front of node:

vi /etc/nginx/conf.d/cloud9.conf
# your node app
upstream cloud9 {
    server 127.0.0.1:3131;
}

# the nginx server instance
server {

    listen YOUR_SERVER_IP:80;
    server_name YOUR_DOMAIN;

    access_log /var/log/nginx/cloud9.access.log;
    error_log  /var/log/nginx/cloud9.error.log;

    location / {
      proxy_http_version 1.1;
      proxy_set_header Upgrade $http_upgrade;
      proxy_set_header Connection "upgrade";

      proxy_set_header X-Real-IP $remote_addr;
      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
      proxy_set_header Host $http_host;
      proxy_set_header X-NginX-Proxy true;

      proxy_pass http://cloud9/;
      proxy_redirect off;
    }
 }

If you get xhr poll error or TransportError message in client (browser), remember to modify smithIo port to 80 in file cloud9/configs/default.js line 65

smithIo: {
  port: 80,
  prefix: "/smith.io/server"
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment