Skip to content

Managing Environments

thinq4yourself edited this page Oct 15, 2014 · 1 revision

Accessing Boxes and Ports (Codio)

When Codio creates a new project, it will generate a unique subdomain like so:

word1-word2.codio.io:port

where word1 and word2 are randomly generated by Codio.

Access over Port 80

Some firewalls block ports other than Port 80 and Port 443 (SSL), and hopstack is setup to run a local server at port 3000, and will also use port 9500 for SSL (as configured in our Gruntfile.coffee config file). Codio provides a simple way of letting us bypasss this restriction. We simply append the port number to the subdomain name as follows:

word1-word2-port.codio.io

Configuring Boxes, Web Servers and Services for external access over HTTP and HTTPS

Sine we are running Apache, Nginx, Node, Ruby etc. and want to access them externally, we need to configure our server/service to listen on a specific port in the normal way.

Codio itself requires a number of ports but have opened up a large number for our Box. We only need be aware of the restrictions we impose based on whether we are using HTTP or HTTPS.

  • Ports 1024 - 9499 are reserved exclusively for HTTP access.
  • Ports 9500 - 9999 are reserved exclusively for HTTPS access.

SSL access does not require us to install a certificate anywhere as Codio proxies everything. Just be sure to only use a Port in the 9500 - 9999 range.

Apache and Nginx are preconfigured to listen for HTTPS on Port 9500 by default.

Original Request Header

Should we need it, the X_FORWARDED_PROTO header contains original request schema.

Preview Menu

Codio offers a fully customizable Preview menu so we can preview both static files (.html) and server side files (.php files, Ruby and Node apps etc.) with a single click. We have already documented our methods as seen in the .codio config file in our project. You can also check out our wiki doc here which references this.

This feature lets us set up any number of 'aliases' both for static files and Box cli commands. And, it is slick.

Clone this wiki locally