Tuesday, 28 January 2014

Apache sites-enabled file names have to end in .conf

Since I've just spend a good couple hours trying to figure out why my Apache virtual host reverse proxy configuration directives were not working, I thought I should post the answer for posterity.

Using Ubuntu 13.10, I had copied the 000-default.conf config file from /etc/apache2/sites-available to my brand new 001-paninuittrails.org config file.

I added a few lines for the server name and reverse proxying (well documented elsewhere), adjusted the symlinks in sites-enabled (adding a link to my new file and removing the link to the default one) and restarted.

To my enormous frustration, and despite all sorts of checking logs (the requests were showing up in an other_vhosts_access.log file so it must know about my vhost, right?) and restarting, all I was getting was the default apache "It Works!" index.html.

After a long bit of searching, comparing to an almost identical working system, and looking for any other differences, I finally realized that my new config file (and symlink) didn't end in ".conf". That's it. It wasn't being read at all.

Edit: FYI, from what I can tell, this is new behaviour in Apache 2.4 on Debian-based systems like Ubuntu. It is presented when you upgrade Ubuntu but I can't seem to find that specific documentation online. There are actually a fair number of upstream gotchas too:

http://httpd.apache.org/docs/2.4/upgrading.html

No comments:

Post a Comment

Modern Ubuntu web kiosk using chromium as the browser engine

 I have been working to prepare a digital atlas exhibit for the Natillik Heritage Centre in Gjoa Haven, Nunavut, Canada. Working with Indig...