Skip to content
apache_apps.vhost.master 2.24 KiB
Newer Older

######################################################
# This virtual host contains the configuration
# for the ISPConfig apps vhost
######################################################

{tmpl_var name='vhost_port_listen'} Listen {tmpl_var name='apps_vhost_port'}
# NameVirtualHost *:{tmpl_var name='apps_vhost_port'}
<VirtualHost {tmpl_var name='apps_vhost_ip'}:{tmpl_var name='apps_vhost_port'}>
  {tmpl_var name='apps_vhost_servername'}
Patrick Anders's avatar
Patrick Anders committed

  <FilesMatch "\.ph(p3?|tml)$">
    SetHandler None
  </FilesMatch>
  <IfModule mod_headers.c>
	RequestHeader unset Proxy early
  </IfModule>
Patrick Anders's avatar
Patrick Anders committed

    DocumentRoot {tmpl_var name='apps_vhost_dir'}
    AddType application/x-httpd-php .php
    <Directory {tmpl_var name='apps_vhost_dir'}>
		Options FollowSymLinks
		AllowOverride None
		<tmpl_if name='apache_version' op='>' value='2.2' format='version'>
		Require all granted
		Order allow,deny
		Allow from all
  <IfModule mod_php7.c>
    DocumentRoot {tmpl_var name='apps_vhost_dir'}
    AddType application/x-httpd-php .php
    <Directory {tmpl_var name='apps_vhost_dir'}>
		Options FollowSymLinks
		AllowOverride None
		<tmpl_if name='apache_version' op='>' value='2.2' format='version'>
		Require all granted
		<tmpl_else>
		Order allow,deny
		Allow from all
		</tmpl_if>
    </Directory>
  </IfModule>
    DocumentRoot {tmpl_var name='apps_vhost_dir'}
    SuexecUserGroup ispapps ispapps
    <Directory {tmpl_var name='apps_vhost_dir'}>
		Options +Indexes +FollowSymLinks +MultiViews +ExecCGI
		AllowOverride AuthConfig Indexes Limit Options FileInfo
		<FilesMatch "\.php$">
			SetHandler fcgid-script
		</FilesMatch>
		FCGIWrapper {tmpl_var name='apps_vhost_basedir'}/php-fcgi-scripts/apps/.php-fcgi-starter .php
		<tmpl_if name='apache_version' op='>' value='2.2' format='version'>
		Require all granted
		Order allow,deny
		Allow from all
{tmpl_if name="use_rspamd"}
  <Location /rspamd>
        Order allow,deny
        Allow from all
  </Location>
  RewriteEngine On
  RewriteRule ^/rspamd$ /rspamd/ [R,L]
  RewriteRule ^/rspamd/(.*) http://127.0.0.1:11334/$1 [P]
{/tmpl_if}