VHostCustomExample

Custom vHost Example

You can make custom entries in to the apache vHost file managed by DTC.

This will cause the following entry in the vhost file located at: /var/lib/dtc/etc/vhosts.conf

(Notice that this example will not actually change the default Directory Index order, for that you have to create a .htaccess file.)

   <VirtualHost 192.168.2.101:80>
        ServerName www.example.org
        Alias /stats /var/www/sites/example.org/example.org/subdomains/www/logs
        Alias /awstats-icon /usr/share/awstats/icon
        DocumentRoot /var/www/sites/example.org/example.org/subdomains/www/html
        <Directory /var/www/sites/example.org/example.org/subdomains/www/html>
                Allow from all
        </Directory>
        ServerAlias example.org
        php_admin_value safe_mode 1
        php_admin_value sendmail_from phpmailfunctionwww@example.org
        php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f phpmailfunctionwww@example.org"
        php_value session.save_path /var/www/sites/example.org/example.org/subdomains/www/tmp
        <Location />
                php_admin_value open_basedir "/var/www/sites/example.org:/usr/lib/php:/tmp:/usr/share/pear:/var/lib/dtc/etc/dtc404:/usr/share/php:/usr/local/lib/php/phplib:"
        </Location>
        RewriteEngine on
        RewriteRule ^/cgi-bin/(.*) /cgi-bin/sbox/$1 [PT]
        ErrorLog /var/www/sites/example.org/example.org/subdomains/www/logs/error.log
        LogSQLTransferLogTable example_org$www$xfer
        LogSQLScoreDomain example.org
        LogSQLScoreSubdomain www
        LogSQLScoreTable dtc.http_accounting
        DirectoryIndex index.php index.cgi index.pl index.htm index.html index.php4
        # Start of custom directives
        DirectoryIndex index.html index.php index.cgi index.pl index.htm index.php4
        # End of custom directives
        <IfModule mod_security.c>
                SecUploadDir /var/www/sites/example.org/example.org/subdomains/www/tmp
        </IfModule>
        <IfModule mod_cband.c>
                CBandUser example.org
        </IfModule>
   </VirtualHost>


Editing this page means accepting its license.

Page last modified on July 01, 2010, at 09:26 AM EST