title: Deploying an express server alongside a wordpress install on an amazon ec2 instance
body: <p>I've setup a wordpress site on an amazon ec2 instance. I want to setup an <code>express</code> server on that instance as well. These are the steps I followed:</p>
  
  <ol>
  <li>Installed npm and node on the cloud</li>
  <li>Cloned the <code>express</code> server code.</li>
  <li><code>npm start</code></li>
  <li><code>curl localhost:8080</code> (returned <code>Hello world!</code>)</li>
  <li><p>Opened ec2 management console and added a security group with these inbound rules:</p>
  
  <ul>
  <li>Custom TCP rule for port 8080 and source <code>0.0.0.0/0</code></li>
  <li>Custom TCP rule for port 8080 and source <code>::/0</code></li>
  </ul></li>
  </ol>
  
  <p>The instance had another security group with these inbound rules:</p>
  
  <ul>
  <li>HTTP rule for port 80</li>
  <li>SSH rule for port 22</li>
  <li>HTTPS rule for port 443 </li>
  </ul>
  
  <p>As the step 4 describes, the server is running correctly on the machine. But I'm having trouble accessing the <code>express</code> server from outside. I tried these methods:</p>
  
  <ol>
  <li>Accessing <code>&lt;public elastic ip&gt;:8080</code></li>
  <li>Accessing <code>&lt;blog domain address&gt;:8080</code></li>
  <li>Accessing <code>&lt;automatically allocated amazon domain&gt;:8080</code></li>
  </ol>
  
  <p>All of them fail with <code>&lt;url&gt; refused to connect</code> error. All of them redirect to my blog if I leave out the port.</p>
  
  <p>How do I access the server running on my ec2 instance from outside?</p>
  
  <p>Edit: The instance I'm using is a bitnami wordpress install</p>