# /etc/apache2/sites-available/050_z.conf -> /var/www/z/z_apache2.conf

<VirtualHost *:80>
ServerName z.lam1.us
ServerAlias z.lamurakami.com z.larrymurakami.com z.larryforalaska.com
ServerAdmin z.ServerAdmin@lam1.us
DocumentRoot "/var/www/z/html"
ErrorDocument 404 /Public/Scripts/Error-404.cgi-pl

ErrorLog logs/z_error.log

<IfModule mod_log_config.c>
     TransferLog logs/z_access.log
</IfModule>

RewriteEngine on

RewriteCond %{REQUEST_FILENAME} ^/(.+)\.html$
RewriteCond %{REQUEST_FILENAME} !/FOOTER\.html$
RewriteCond %{REQUEST_FILENAME} !/HEADER\.html$
RewriteCond /var/www/z/html/%1.html -f
RewriteRule ^/(.+)\.html$  /Public/Scripts/menuBar.cgi-pl	[QSA,PT,E=RewriteHtml:/$1.html]

# allow cgi-pl scripts in Public/Scripts
#  to be accessed at web root level without file extension.
RewriteCond %{REQUEST_FILENAME} (.*)$
RewriteCond /var/www/no-ssl/html/Public/Scripts%1.cgi-pl -x
RewriteRule (.+)$ /Public/Scripts%1.cgi-pl [PT]

RewriteRule ^/man/(.+)$ /Public/Scripts/man.cgi-pl?Submit=View&Keyword=$1 [PT]
RewriteRule ^/whatis/(.+)$ /Public/Scripts/whatis.cgi-pl?Submit=View&Keyword=$1 [PT]
RewriteRule ^/apropos(.*)$ /Public/Scripts/whatis.cgi-pl?Submit=View&Search+type=both&Keyword=$1 [PT]
RewriteRule ^/time\??(.*)$ /Public/Scripts/TimeMark.cgi-pl$1	[QSA,PT,E=RewriteRule:/time]

</VirtualHost>
