0

Edit: The problem disappeared when I restarted my computer. I apologize for wasting everyone's time with this!


I'm trying to set up local .dev domains for my different production apps. I have an entry like this in my httpd.conf file:

<VirtualHost app.appname.dev:80>
   ServerName app.appname.dev
   ProxyPass / http://localhost:3000/
   ProxyPassReverse / http://localhost:3000/
</VirtualHost>


<VirtualHost ppa.appname.dev:80>
   ServerName ppa.appname.dev
   ProxyPass / http://localhost:3000/
   ProxyPassReverse / http://localhost:3000/
</VirtualHost> 

I'm using dnsmasq to route traffic from *.dev to localhost (using address=/dev/127.0.0.1 in my dnsmasq.conf)

Okay, the mystery is that app.appname.example works perfectly fine. But ppa.appname.dev gives an this error message in my browser:

Service Unavailable

The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.

I've restarted apache many times, flushed my dns, tried different orderings of these VirtualHost declarations, and nothing seems to jiggle it loose. Any idea what might be going on here?

9
  • 1
    Thanks for cleaning it up, @Hyppy! You made this look much nicer.
    – jpadvo
    Apr 30, 2015 at 18:35
  • In the past, I always found apache reverse proxying to not work properly. However, when using nginx or haproxy it seemed to just work so simply. Try those.
    – hookenz
    Apr 30, 2015 at 19:55
  • I use Apache reverse proxying every day on a large site without complaint. I would suggest that you post the output of getent hosts app.appname.dev. This will show you the same result that Apache would get when it does a lookup on the name (it takes into account things like /etc/hosts and other potential caching layers such as nscd). Apr 30, 2015 at 20:00
  • Other than using dnsmasqd, if you only want this on your local machine, just add the following line in /etc/hosts: 127.0.0.1 ppa.appname.dev. Apr 30, 2015 at 20:01
  • Do you have the command NameVirtualHost *:80 in your config? Apr 30, 2015 at 20:02

0

You must log in to answer this question.

Browse other questions tagged .