The following are the Vhost Examples which could serve most of the Lamp Environment needs
Basic VHOST |
ServerAdmin [email protected]
DocumentRoot /var/www/FQDN.com
ServerName FQDN.com
ServerAlias www.FQDN.com
ErrorLog logs/FQDN.com-error_log
CustomLog logs/FQDN.com-access_log combined
AddHandler cgi-script .cgi
Options -Indexes FollowSymLinks ExecCGI Includes
AllowOverride All
Order Allow,Deny
Allow from all
ExpiresActive On
ExpiresDefault "access plus 5 minute"
RewriteEngine On
RewriteCond %{REQUEST_METHOD} ^TRACE
RewriteRule .* - [F]
|
VHOST with ACL |
ServerAdmin [email protected]
DocumentRoot /var/www/FQDN.com
ServerName FQDN.com
ServerAlias www.FQDN.com
ErrorLog logs/FQDN.com-error_log
CustomLog logs/FQDN.com-access_log combined
AddHandler cgi-script .cgi
Options -Indexes FollowSymLinks ExecCGI Includes
AllowOverride All
Order deny,allow
Deny from all
Allow from 64.212.190.0/24 192.168.96.0/20
ExpiresActive On
ExpiresDefault "access plus 5 minute"
RewriteEngine On
RewriteCond %{REQUEST_METHOD} ^TRACE
RewriteRule .* - [F]
|
Redirect-Only VHost |
ServerAdmin [email protected]
ServerName FQDN.com
ServerAlias www.FQDN.com
RewriteEngine On
RewriteRule ^/(.*) http://www.othersite.com/path/$1
RewriteCond %{REQUEST_METHOD} ^TRACE
RewriteRule .* - [F]
|
0 comments:
Post a Comment