Localhost subdomains with Ubuntu, Vagrant and Webrick

Hi there,

I’m using act_as_tenant gem and I would like to test it on my local
I need to have entries like “app1.localhost”, “app2.localhost”, etc.

I’ve tried to set those entries on /etc/hosts: localhost app1.localhost app2.localhost

But http://app2.localhost:3000 does not respond.

Am I missing something?

P.S.: I’m using a vagrant running Ubuntu.

Thanks in advance

  1. Did you save the hosts file ?
  2. Did you restart your network ?

On Thu, Mar 19, 2015 at 7:49 PM, Leandro França <

Yup, it’s saved. I checked it using

cat /etc/hosts

I also restarted ubuntu as a whole.

Em quinta-feira, 19 de março de 2015 12:44:50 UTC-3, Vivek S.