All pastes #107702 Raw Edit

skwashd

public text v1 · immutable
#107702 ·published 2006-07-31 03:25 UTC
rendered paste body
NameVirtualHost 10.10.10.10:80
<VirtualHost 10.10.10.10:80>
        ServerName intranet
        ServerAlias intranet.name1.com
        ServerAlias intranet.name2.com
        ServerAdmin webmaster@name1.com

        ServerSignature Off

        DocumentRoot /var/www/intranet
        <Directory />
                Options FollowSymLinks
                AllowOverride None
        </Directory>
        <Directory /var/www/intranet>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                allow from all

                #Rewrite Rules
                #Generic sitemgr friendly URLs
                RewriteRule ^([^/]*)$ index.php?page_name=$1&%{QUERY_STRING}

                #Name 1
                RewriteCond %{REMOTE_ADDR} ^10\.1\.[12]?\d{1,2}\.[12]?\d{1,2}
                RewriteRule ^/templates/intranet/(.*) /templates/name1/$1 [L]

                #Name 2
                RewriteCond %{REMOTE_ADDR} ^10\.2\.[12]?\d{1,2}\.[12]?\d{1,2}
                RewriteRule ^/templates/intranet/(.*) /templates/name2/$1 [L]
        </Directory>

        #Logging
        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel error
        ErrorLog /var/log/apache2/intranet-error.log

        CustomLog /var/log/apache2/intranet-access.log combined

        RewriteLog /var/log/apache2/intranet-rewrite.log
        RewriteLogLevel 5
</VirtualHost>