Apache Web Server – Require all granted

Just upgraded my web server to the current version of ubuntu and got caught out by a change in apache httpd. (Note to self: RTF-release-notes next time.)

It resulted with a 403 / Forbidden error, with the browser showing You don’t have permission to access / on this server, and a client denied by server configuration entry in the log.

The issue was the addition of mod_authz. It needs a new entry in the Directory section of your web site config:

Require all granted

It is equivalent to the old allow from all. Check the Apache mod_authz_core page for more details.

Luckyily this time it was a fairly easy fix, and mod_authz seems to have some fairly interesting features to explore. In any case, if your web sites stop working after an upgrade in your ubuntu server, this is probably the issue.

Getting wTorrent working with Apache

wTorrent is a web interface for the rTorrent bit-torrent client. This post shows you how to get it working in ubuntu or another similar debian derivative. This presumes you already have working copies of rTorrent and apache2, and they are running on the same computer.

To get wTorrent running you need the following:

  • xmlrpc-c library
  • xml-rpc php5 module
  • mod_scgi apache2 module

Continue reading “Getting wTorrent working with Apache”

Using Apache httpd with Glassfish

If you have a working instance of apache and a working instance of glassfish, you can get them working together, i.e. have apache handle all the incoming http and let it forward any jsp or servlet calls to glassfish.

You’ll need to dowload and setup mod_jk for apache.

Then you’ll need to follow the instructions in
http://weblogs.java.net/blog/jfarcand/archive/2006/03/running_glassfi_1.html

As per the instruction, you will need the tomcat-ajp.jar file from Tomcat 5.5.16.

NOTE: The latest version of Tomcat 5.5 at the time of writing this is 5.5.25 and it will not work. You will get an error message like NoSuchMethodError getContentLengthLong in your glassfish log. So, save yourself a lot of time and frustration and stick to 5.5.16.

The rest should be obvious from the instructions.

Update: Looks like the tomcat-ajp issue is fixed for version 2.1, and it works with Tomcat 5.5.26. Thanks Amy for the update. I didn’t even know my post had made it to the glassfish issue tracker! Though, perhaps I should have followed open source developer etiquette and entered the issue in there myself! 🙂