Apache

Links
http://gentoo-wiki.com/Apache2_Install

http://gentoo-wiki.com/HOWTO_Apache2

http://www.gentoo.org/doc/en/apache-upgrading.xml

http://www.gentoo.org/doc/en/apache-troubleshooting.xml

Logs
Logs

Links
http://gentoo-wiki.com/HOWTO_Apache2_with_perl

Mod Secutity
ModSecurity is an open source web application firewall that runs as an Apache module. It provides protection from a range of attacks against web applications and allows for HTTP traffic monitoring and real-time analysis with no changes to existing infrastructure. This no luxury nowadays because to expand your website functionality everybody adds script languages like php and perl.

Install and configure
Download new rules from mod security at http://www.modsecurity.org/download/index.html, probably you have to create an account to download it. At this time the newer version is of the core rules is modsecurity-core-rules_2.1-1.5.1.tar.gz.

Move the old rules to a backup directory and place the new rules at /etc/apache2/modules.d/mod_security.

Edit the modsecurity_crs_10_config.conf file to set your log files:

Mediawiki posts now allowed
If your mediawiki posts need to have paths like /etc on your body you need this workaround:

Mod Macro
http://www.gentoo.org/news/en/gwn/20071015-newsletter.xml#doc_chap3

Restricting pages
Here it is explained a simple way to protect you files/pages, I recommend to read the references for more information!

Configure
First define the users and passwords:

The -c is to create the file.

Then edit the file .htaccess of the place you want to secure, for example /usr/local/apache/htdocs/secret/.htaccess