#debian
#LoadModule perl_module /usr/lib/apache2/modules/mod_perl.so
#user
ServerName localhost
User lze
Group lze
NameVirtualHost *:80
<VirtualHost *:80>
DirectoryIndex index.html index.pl index.php
ServerName localhost
ServerAlias localhost
ServerAdmin lze@cpan.org
ServerSignature on
UseCanonicalName On
HostnameLookups On
DocumentRoot "/var/www/htdocs/"
RewriteEngine On
#https only
RedirectMatch /perl/foo.pl https://localhost
<Directory "/var/www/htdocs">
AllowOverride All
Order allow,deny
Allow from all
</Directory>
ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
<Directory "/var/www/cgi-bin/">
AllowOverride None
Options +ExecCGI -Includes
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
################################################################################################
#ssl
# create ssl key
# 1. openssl genrsa -out server.key -des3 1024
# create cert
# 2.openssl req -new -key server.key -out server.csr
# 3. sign
# openssl req -new -x509 -days 1500 -key server.key -out server.crt
################################################################################################
LoadModule ssl_module /usr/lib/apache2-prefork/mod_ssl.so
Listen 443
SSLMutex sem
SSLRandomSeed startup builtin
NameVirtualHost *:443
<VirtualHost *:443>
DirectoryIndex index.html index.pl index.php
ServerName localhost
ServerAlias localhost
ServerAdmin lindnerei@o2online.de
ServerSignature on
UseCanonicalName On
HostnameLookups On
DocumentRoot "/var/www/htdocs"
RewriteEngine On
SSLEngine on
SSLCertificateFile /home/lze/server.crt
SSLCertificateKeyFile /home/lze/server.key
<Directory "/var/www/htdocs">
AllowOverride All
Order allow,deny
Allow from all
</Directory>
ScriptAlias /cgi-bin/ "D:\srv\www\cgi-bin\"
<Directory "/var/www/cgi-bin">
AllowOverride None
Options +ExecCGI -Includes
Order allow,deny
Allow from all
</Directory>
<IfModule mod_perl.c>
#PerlModule Apache2 #could be nessesary on some systems #suse
PerlRequire "/var/www/cgi-bin/config/startup.pl"
ScriptAlias /perl/ "/var/www/cgi-bin"
#PerlModule Apache2::Reload #
#PerlInitHandler Apache2::Reload #
<Location /perl/>
SetHandler perl-script
PerlResponseHandler ModPerl::Registry
PerlOptions +ParseHeaders
PerlSetVar PerlTaintCheck On
</Location>
</IfModule>
</VirtualHost>
# If you want mod_rewrite
#LoadModule rewrite_module /usr/lib/apache2-prefork/mod_rewrite.so
# php einschalten
#AddType application/x-httpd-php .php
#ePerl not required for this dist.
# <Files ~ "/var/www/cgi-bin/.+\.epl$">
# Options +ExecCGI
# SetHandler perl-script
# PerlHandler Apache::ePerl
# </Files>
#enable perl (cgi-version).
#AddHandler cgi-script cgi pl
#cache control
LoadModule expires_module /usr/lib/apache2-prefork/mod_expires.so
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType text/html "access plus 1 month"
ExpiresByType text/css "access plus 1 month"
ExpiresByType text/javascript "access plus 1 month"
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/jpeg "access plus 6 month"
ExpiresByType image/png "access plus 6 month"
</IfModule>
LoadModule headers_module /usr/lib/apache2-prefork/mod_headers.so
<IfModule mod_headers.c>
<Files ~ "\.(js|css|gif|jpe?g|png)$">
Header append Cache-Control "public"
</Files>
</IfModule>