Create a local PyPi repository using only mod_rewrite

Regular users of Python’s package tools like pip or easy_install are probably familiar with the PyPi repository. It’s a one-stop-shop to learn more about available Python packages and get them installed on your server. However, certain folks may find the need to host a local PyPi repository for their own packages. You may need it to store Python code which you don’t plan to release publicly or you may need to add proprietary patches to upstream Python packages.
Read more →

Getting apache, PHP, and memcached working with SELinux

I’m using SELinux more often now on my Fedora 15 installations and I came up against a peculiar issue today on a new server. My PHP installation is configured to store its sessions in memcached and I brought over some working configurations from another server. However, each time I accessed a page which tried to initiate a session, the page load would hang for about a minute and I’d find this in my apache error logs:
Read more →

Throwing thoughtful “403 Forbidden” responses with apache

If you offer a web service that users query via scripts or other applications, you’ll probably find that some people will begin to abuse the service. My icanhazip.com site is no exception. While many of the users have reasonable usage patterns, there are some users that query the site more than once per second from the same IP address. If you haven’t used the site before, all it does is return your public IP address in plain text.
Read more →

Private network interfaces: the forgotten security hole

Regardless of the type of hosting you’re using - dedicated or cloud - it’s important to take network interface security seriously. Most often, threats from the internet are the only ones mentioned. However, if you share a private network with other customers, you have just as much risk on that interface. Many cloud providers allow you access to a private network environment where you can exchange data with other instances or other services offered by the provider.
Read more →

A New Year System Administrator Inspiration

Happy New Year! I certainly hope it’s a great one for you, your family, and your business. As the new year begins, I figured it would be a good time to sit down and answer a question that I hear very often: How do I become a better systems administrator? The best way to become a better systems administrator is to fully understand the theory of what’s happening in your server’s environment.
Read more →