All pastes #79182 Raw Edit

Unnamed

public text v1 · immutable
·published 2006-07-05 01:17 UTC
rendered paste body
ServerAdmin admin@domain.tld
NameVirtualHost *:80
NameVirtualHost *:443
ServerName domain.tld
DocumentRoot /var/www/base_http
DirectoryIndex index.html index.html.var index.php
UseCanonicalName Off

# Logging
#
HostnameLookups On
LogFormat "%h %t %{Referer}i -> %U -- %{User-agent}i" details
ErrorLog /var/log/httpd/error_log

CustomLog /var/log/httpd/access_log common
CustomLog /var/log/httpd/details_log details

# Main site declaration
#
<Directory "/var/www/base_http">
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Order deny,allow
        Allow from all
        
        # Block TRACE/TRACK XSS vector
        RewriteEngine On
        RewriteCond %{REQUEST_METHOD} ^TRAC(E|K)
        RewriteRule .* - [F]
</Directory>
<FilesMatch "^(.*)!([\.])$">
        ForceType application/x-httpd-php
</FilesMatch>

DavLockDB /var/httpd/DavLock

Include "/usr/pkg/etc/httpd/vhosts.conf" # SEE PASTE http://pastebin.ca/79164 

# Main server
<VirtualHost *:80>
        ServerName domain.tld
        ServerAlias www.domain.tld domain.tld *.domain.tld
        DocumentRoot /var/www/base_http
        VirtualDocumentRoot /var/www/base_http
        
        <IfModule mod_rewrite.c>
                RewriteEngine On
                RewriteCond %{HTTP_HOST} ^www\.domain.\.tld$          [NC]
                RewriteRule ^(.*)$ http://smurfturf.net$1               [R=301,L]
                
                # This is important so that the ssl server always uses ssl
                RewriteCond %{HTTP_HOST} ^secure\.domain\.tld$               [NC]
                RewriteRule ^(.*)$ https://secure.domain.tld$1               [R=301,L]
                
                # Block TRACE/TRACK XSS vector
                RewriteCond %{REQUEST_METHOD} ^TRAC(E|K)
                RewriteRule .* - [F]
        </IfModule>
</VirtualHost>