Archive

Posts Tagged ‘apache’

Using apache’s RedirectMatch instead of ServerAlias to avoid content duplication

May 18th, 2009 pablo 3 comments

Most web sites I do have many domains but want all those domains to point to the “main domain” www.domain.com. My first solution was to put Apaches’s directive ServerAlias in the site’s virtual host configuration. This lead to content duplication since domain.com and domain.net and www.domain.com are two different web sites for the rest of the world. To avoid this problem the only solution I’ve found was to create two different virtual hosts and set Apache’s Redirect directive. The first VirtualHost will hold all the domains aliases and redirect permanently (301) to the “main domain”

Read more…

Categories: apache Tags: ,

Set new logrotate tasks to rotate apache logs in non-standard directories

April 23rd, 2009 pablo 6 comments

I prefer compressing old logs to save space. Edit logrotate.conf

vi /etc/logrotate.conf

Read more…

Categories: logrotate Tags: , , , ,