title: Perl Mojolicious unable to connect to server
body: <p>I am attempting to run a Mojolicious server (using Morbo or Hypnotoad) on my VM, but I am unable to connect to my server remotely. Here is my code</p>
  <pre><code>use Mojolicious::Lite;
  use strict;
  use v5.18;
  
  app-&gt;config(hypnotoad =&gt; {listen =&gt; ['http://*:80']});
  
  get '/' =&gt; sub {
      my $c = shift;
      return $c-&gt;render(text =&gt; &quot;At the index end point&quot;);
  };
  
  get '/foo' =&gt; sub {
      my $c = shift;
      return $c-&gt;render(text =&gt; &quot;At the foo end point&quot;);
  };
  
  get '/bar' =&gt; sub{
      my $c = shift;
      return $c-&gt;render(text =&gt; &quot;At the bar end point&quot;);
  };
  
  app-&gt;start;
  </code></pre>
  <p>Here is how I start it</p>
  <pre><code>$ sudo hypnotoad app2.pl 
  $ Starting hot deployment for Hypnotoad server 1960.
  </code></pre>
  <p>I attempt to visit the URL from my address bar and it just hangs.</p>
  <p>How can I diagnose this or troubleshoot to see what the issue is?</p>
  <p>If I run netstat, I can clearly see that port 80 is open. Doesn't matter if I change to a different port; the same issue (inability to connect) occurs.</p>
  <pre><code>$ netstat -lntp
  
  (Not all processes could be identified, non-owned process info
   will not be shown, you would have to be root to see it all.)
  Active Internet connections (only servers)
  Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
  tcp        0      0 127.0.0.1:587           0.0.0.0:*               LISTEN      -               
  tcp        0      0 0.0.0.0:6379            0.0.0.0:*               LISTEN      -               
  tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      -               
  tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      -               
  tcp        0      0 127.0.0.1:5432          0.0.0.0:*               LISTEN      -               
  tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      -               
  tcp6       0      0 :::6379                 :::*                    LISTEN      -               
  tcp6       0      0 :::22                   :::*                    LISTEN      -        
  </code></pre>