Skip to content
vhost.conf.master 1.38 KiB
Newer Older
tbrehm's avatar
tbrehm committed
# NameVirtualHost *:80

<VirtualHost <tmpl_var name='ip_address'>:80>
tbrehm's avatar
tbrehm committed
    DocumentRoot <tmpl_var name='web_document_root'>
    ServerName <tmpl_var name='domain'>
tbrehm's avatar
tbrehm committed
    ServerAlias <tmpl_var name='alias'>
    RewriteEngine on
tbrehm's avatar
tbrehm committed
<tmpl_if name='cgi'>
tbrehm's avatar
tbrehm committed
    # cgi enabled
    ScriptAlias  /cgi-bin/ <tmpl_var name='document_root'>/cgi-bin/
    AddHandler cgi-script .cgi
    AddHandler cgi-script .pl
tbrehm's avatar
tbrehm committed
</tmpl_if>
<tmpl_if name='ssi'>
tbrehm's avatar
tbrehm committed
    # ssi enabled
    AddType text/html .shtml
    AddOutputFilter INCLUDES .shtml
tbrehm's avatar
tbrehm committed
</tmpl_if>
<tmpl_if name='suexec'>
	# suexec enabled
tbrehm's avatar
tbrehm committed
    SuexecUserGroup <tmpl_var name='system_user'> <tmpl_var name='system_group'>
tbrehm's avatar
tbrehm committed
</tmpl_if>
<tmpl_if name='php' op='==' value='mod'>
tbrehm's avatar
tbrehm committed
    # mod_php enabled
    AddType application/x-httpd-php .php .php3 .php4 .php5
tbrehm's avatar
tbrehm committed
</tmpl_if>
<tmpl_if name='php' op='==' value='suphp'>
tbrehm's avatar
tbrehm committed
    # suphp enabled
    suPHP_Engine on
    suPHP_UserGroup <tmpl_var name='system_user'> <tmpl_var name='system_group'>
    AddHandler x-httpd-php .php .php3 .php4 .php5
    suPHP_AddHandler x-httpd-php
tbrehm's avatar
tbrehm committed
</tmpl_if>
<tmpl_if name='php' op='==' value='cgi'>
tbrehm's avatar
tbrehm committed
    # php as cgi enabled
    AddType application/x-httpd-php .php .php3 .php4 .php5
tbrehm's avatar
tbrehm committed
</tmpl_if>
tbrehm's avatar
tbrehm committed


<tmpl_loop name="redirects">
    RewriteCond %{HTTP_HOST}   ^<tmpl_var name='rewrite_domain'> [NC]
    RewriteRule   ^/(.*)$ <tmpl_var name='rewrite_target'>$1  [<tmpl_var name='rewrite_type'>]
</tmpl_loop>

</VirtualHost>