Chrooted Apache



As I prepare to have my server public, I’ve chrooted my server’s Apache with mod_chroot. This allows me to have the advantages of a chroot environment without as many of the draw backs. There is still some strangeness to work out. For instance “Warning: timezone_open() [function.timezone-open]: Unknown or bad timezone (America/Chicago) in /wp/wp-includes/functions.php on line 3160

I’ll get this figured out, but honestly, it’s not a huge deal. I may have to have Apache load the zoneinfo file, or perhaps not… Really, the only change I had to make to WordPress was to have it connect to the MySQL database on 127.0.0.1 instead of localhost. With localhost it tries to use the socket (which I hear can be about 20% faster.) Since the socket isn’t in the chrooted directory, I’ll just use TCP and take a minor performance hit.

As for the hardware itself, I’m relatively pleased with this hand-me-down. I think I’d like  to boost the ram from 128 to at least 384, and perhaps eventually max it out to 512. Spending the $20 on the 256 megs should at least have my server sitting pretty comfortable without swapping quite as much. After that it should also be able to take over the responsibilities of hosting my Quassel core server (which is currently on my router.) I should probably have this one take over hosting my Git repos then my router will only be a router and not a server, which is fine by me.

I should hopefully get this beast of a machine public by Wednesday. It should be accessible via http://losinggeneration.with-linux.com when I’m finished. I still have to create the new firewall to have this server as a DMZ.


One thought on “Chrooted Apache

  • Stuart

    I had a similar timezone error from Joomla on a chrooted NGINX on Debian – the solution was to copy /etc/localtime & /usr/share/zoneinfo into the php-fpm chroot:

    “Debian PHP has been patched to use of the system wide timezone database from the tzdata package, making sure any updates there are automatically used by PHP aswell.”

    Reply

Speak Your Mind

Your email address will not be published. Required fields are marked *

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>