http://www.apache.org
What can I say... Apache is the web server against which all other web servers are measured!
echo apache:x:80:80:apache:/: >> /etc/passwd
Then I create the group apache:
echo apache::80:apache >> /etc/groups
I built apache with this configure invocation:
./configure --prefix=/apache/apache-2.0.53 --enable-mods-shared=all
--enable-suexec --with-suexec-caller=apache
inferno.slug.org uses mod_perl to run the wiki script.
I used mod_perl-1.999.21 aka mod_perl-2.00-RC4
I used this invocation to make mod_perl consistent with my Apache install:
perl Makefile.PL MP_APXS=/apache/apache-2.0.53/bin/apxs make make test make install
mod_perl causes Apache to run with a loaded perl interpreter, so perl based cgi scripts will run immediately without the overhead of starting an external perl interpreter each time the script is run.
Scripts run under mod_perl will be reinterpreted each time they are invoked, so it is much better to create a perl module defining the procedures used by the cgi scripts and then to load that into Apache via the mod_perl perl module loading directives:
To use mod_perl you need to have these lines in your httpd.conf:
LoadModule perl_module modules/mod_perl.so PerlModule Apache2 (as of mod-perl-2.0.0 - it's now mod_perl2)
inferno.slug.org uses mod_rewrite for two things, enhanced accessibility and security. mod_rewrite is one of the few things I can think of that can simultaneously enhance security and increase access:
RewriteEngine on
# all requests sporting a pr0n referrer get 403'd
RewriteBase /
RewriteCond %{HTTP_REFERER} ^.+sex.+$ [OR]
RewriteCond %{HTTP_REFERER} ^.+porn.+$ [OR]
RewriteCond %{HTTP_REFERER} ^.+virgin.+$ [OR]
RewriteCond %{HTTP_REFERER} ^.+wickedsearch.+$ [OR]
RewriteCond %{HTTP_REFERER} ^.+lover.+$
RewriteRule ^.*$ - [F]
# remap any request for a document in the /wiki
# directory under /apache/htdocs to the cgi script
RewriteBase /cgi-bin
# converts things like /wiki/phil.html to /wiki?phil
RewriteRule wiki\/(.+)\.html? wiki?$1 [L,R=permanent]
RewriteRule wiki\/([^\/]+) wiki?$1 [L,R=permanent]
RewriteRule wiki$ wiki [L,R=permanent]
# end of mod_rewrite section
The set of porn referrer rules were implemented to halt an attack by some distributed denial of service network that was apparently being used to poison the webalizer logs of any number of sites by causing the most popular referrers list to include a number of porn sites.
This is done by causing requests to be made from all over the net with faked referrer strings, as in this example invocation of curl:
curl -e http://www.micro$oft.com/lies.html http://www.linux.org
Which sends a request to linux.org that seems to have come via a link at www.micro$oft.com on the page lies.html.
It is not clear to me that there is any purpose in this except as a kind of 'tagging', but it also could get your site net-nannied!