Posts Tagged ‘Apache’

We’re probably not the only company switching to Python 2.7. Right now, we’re in the final phase of rolling out an updated version that uses Python 2.7. As I was setting up our servers, I ran into a few issues with packages who were hardcoded to use Python 2.6 or earlier.

Both Chronicle and YippieMove are using Django, and use on Apache with mod_wsgi. When building these two packages, we found out that were both hardcoded to use Python 2.6 or earlier. Fortunately, there’s a simple solution for it.

The first package is ‘dev/apr1′, one of Apache’s dependencies. To resolve this issue, simply edit ‘/usr/ports/dev/apr1/Makefile’. Find the line that says:

USE_PYTHON_BUILD= -2.6

and replace it with:

USE_PYTHON_BUILD= -2.7

The second application is mod_wsgi (www/mod_wsgi) itself. To resolve this edit ‘/usr/ports/www/mod_wsgi/Makefile‘ and change the line:

USE_PYTHON= 2.4-2.6

to

USE_PYTHON= 2.4-2.7

Both packages will compile just fine with Python 2.7, so no worries. I have notified both maintainers, but in the meantime, the above fix should do. Also, don’t forget to run ‘make clean’ before you try to rebuild the packages. Just for the record, we’re running FreeBSD 8.1 (AMD64), but that shouldn’t matter for the issue above.

Monit is a great little utility that monitors your daemons. If a daemon fails, Monit will start the daemon it will automatically restart the process. It comes in very handy if for web-servers, such as Apache.

For Red iGone we use Apache as the web-server, and PostgreSQL as the database. I wanted to configure Monit to keep an eye on these processes. As it turns out, setting up Monit was really straight-forward.

I tried this on Ubuntu 9.10 and 10.04. If you try this on a different Ubuntu version (or other distribution), it is likely that you will need to make changes to apache.conf and postgresql.conf.
more>>