Introducing Thornhill
19 Jan 2012At $WORK I'm moving a web server to a new machine. Natch, I'm getting the new one ready, testing as I go, and when things are good I'll change DNS to point to the new machine. I found myself testing a lot of Apache Alias directives -- we've accumulated rather a lot -- my usual routine:
- Fire up my laptop
- Edit /etc/hosts and add a record for the website pointing at the new server
- Fire up the browser on the laptop
- Fire up the browser on my desktop
- Look up the Alias record in httpd.conf
- Type it into both
- vgrep for differences
...was getting damned tiresome. Perl to the rescue! WWW::Mechanize, Test::More and Apache::Admin::Config are damned useful, and when the authors weren't looking I bent them to my will.
So: thornhill, a Small but Useful(tm) script to check URLs mentioned in Apache config files. Here's what it does:
- Sucks in an httpd.conf file
- Looks for all the Alias directives in the VirtualHost section
- Verifies that the content of those URLs on the old and new server is identical
We'll call this release 0.1 ("works for me!"). You can download it here; be sure to note the bugs and assumptions.
Share and enjoy!
Update: Problems have arisen.
Add a comment:
Name and email required; email is not displayed.
Related Posts
QRP weekend 08 Oct 2018
Open Source Cubesat Workshop 2018 03 Oct 2018
mpd crash? try removing files in /var/lib/mpd/ 11 Aug 2018