Category: Webservers

Canonical Rewrite Rules

Here’s a good rule set for forcing use of a preferred url:

This version of the canonical rewrite expands on the original found here: http://httpd.apache.org/docs/2.2/rewrite/rewrite_guide.html#canonicalhost by adding: redirects domains with suffixes (not just prefixes) back to the canonical host;

Read More »

Setting Apache umask

Problem was that uploaded files were being assigned permissions of 0600 which is “-rw——-“. The webserver was then unable to service the files. The “0600” permissions corresponds to a umask of “066”. Instead I wanted “022” which would yield “-rw-rw-r–”

Read More »

Tomcat Log Rotation

Here’s a simple logrotate script for Tomcat:

It should be placed at:

Read More »

Parse .html files for PHP

Create a .htaccsss file containing the following lines:

Read More »

Get a free consultation from Reliable Penguin

Submit the form—or for immediate service call 866-649-7984.