0

I am trying to tunnel the localhost in travis ci with ngrok. So far I have been able to expose the site, but unfortunately any curl request to a simple text file gives me 404 error. Only index pages are visible/downloadable. How can I configure it, so that files can be downloaded.

This is my virtual host config:

<VirtualHost *:80>
            DocumentRoot $1
            <Directory $1>
                    Options Indexes FollowSymLinks MultiViews
                    AllowOverride All
                    Order allow,deny
                    allow from all
            </Directory>
            DirectoryIndex index.php index.html
</VirtualHost>

$1 is the random subdomain name given by ngrok (I am storing the virtual host config as a string) .

This is the /etc/hosts file at some point:

127.0.0.1   a3a1a93a.ngrok.io

127.0.0.1   8dbc2f3e.ngrok.io

## cookbook:: travis_build_environment

##     file:: templates/default/etc/cloud/templates/hosts.tmpl.erb

127.0.1.1 testing-gce-478a98cf-1fda-48f0-9b75-4c72e55e1305 testing-gce-478a98cf-1fda-48f0-9b75-4c72e55e1305 ip4-loopback trusty64

The first two entries are the tunneled subdomains by ngrok.

Jahid
  • 21,542
  • 10
  • 90
  • 108
  • As the 404 implies, it couldn't the file. My ngrok configuration wasn't right. ngrok was always pointing to localhost:80 when my actual local server was a3a1a93a.ngrok.io:80. using `addr: actual-server:80` in ngrok conf solved the problem. – Jahid Oct 21 '16 at 12:38
  • I am voting to close it as off-topic, because it was caused by misconfiguration of ngrok – Jahid Oct 21 '16 at 12:39

0 Answers0