Multiple sites on Apache without virtual hosts
1 AliasMatch ^/_(.+?)/(.*)?$ "d:/sites/$1/$2" 2 3 <Directory "d:/sites/*"> 4 Options Indexes 5 AllowOverride All 6 Order allow,deny 7 Allow from all 8 </Directory>
DZone Snippets > peter > apache
12878 users tagging and storing useful source code snippets
Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
Peter Cooperx http://www.petercooper.co.uk/
1 AliasMatch ^/_(.+?)/(.*)?$ "d:/sites/$1/$2" 2 3 <Directory "d:/sites/*"> 4 Options Indexes 5 AllowOverride All 6 Order allow,deny 7 Allow from all 8 </Directory>
1 RewriteCond %{REQUEST_FILENAME} !-f 2 RewriteCond %{REQUEST_FILENAME} !snippets\.html 3 RewriteRule ^(.*)$ dispatch.fcgi [QSA,L] 4 RewriteRule snippets\.html /snippets/ [R]
1 AddType application/x-httpd-php .html
1 #!/usr/bin/perl 2 3 use FCGI; 4 5 $cnt = 0; 6 7 while (FCGI::accept() >= 0) 8 { 9 print ("Content-type: text/html\r\n\r\n"); 10 print ("<head>\n<title>FastCGI Demo Page (perl)</title>\n</head>\n"); 11 print ("<h1>FastCGI Demo Page (perl)</h1>\n"); 12 print ("This is coming from a FastCGI server.\n<BR>\n"); 13 print ("Running on <EM>$ENV{USER}</EM> to <EM>$ENV{REMOTE_HOST}</EM>\n<BR>\n"); 14 $cnt++; 15 print ("This is connection number $cnt\n"); 16 }
1 RewriteEngine On 2 RewriteCond %{HTTP_X_MOZ} ^prefetch$ 3 RewriteRule ^.*$ - [F]
1 RewriteEngine On 2 RewriteCond %{HTTP_REFERER} ^.*slashdot.*$ 3 RewriteRule .* - [F]
1 /usr/local/apache2/bin/apxs -c mod_foo.c 2 /usr/local/apache2/bin/apxs -i -a -n foo mod_foo.la