apache_apps.vhost.master 2.38 KB
Newer Older
1 2 3 4 5 6

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

7 8
{tmpl_var name='vhost_port_listen'} Listen {tmpl_var name='apps_vhost_port'}
# NameVirtualHost *:{tmpl_var name='apps_vhost_port'}
9

10
<VirtualHost {tmpl_var name='apps_vhost_ip'}:{tmpl_var name='apps_vhost_port'}>
11
  ServerAdmin webmaster@localhost
12
  {tmpl_var name='apps_vhost_servername'}
13
  
14 15 16 17
  <FilesMatch "\.ph(p3?|tml)$">
    SetHandler None
  </FilesMatch>
  
18 19 20 21
  <IfModule mod_headers.c>
	RequestHeader unset Proxy early
  </IfModule>
  
22 23 24 25 26 27
  {tmpl_if name="enable_spdy" op="==" value="y"}
  <IfModule spdy_module>
	SpdyEnabled on
  </IfModule>
  {/tmpl_if}

28
  <IfModule mod_php5.c>
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
    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>
  
  <IfModule mod_php7.c>
44
    DocumentRoot {tmpl_var name='apps_vhost_dir'}
45
    AddType application/x-httpd-php .php
46 47 48 49 50 51 52 53 54
    <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>
55 56 57
    </Directory>
  </IfModule>
  
58
  <IfModule mod_fcgid.c>
59
    DocumentRoot {tmpl_var name='apps_vhost_dir'}
60
    SuexecUserGroup ispapps ispapps
61 62 63
    <Directory {tmpl_var name='apps_vhost_dir'}>
		Options +Indexes +FollowSymLinks +MultiViews +ExecCGI
		AllowOverride AuthConfig Indexes Limit Options FileInfo
64 65 66
	    <FilesMatch "\.php$">
		  SetHandler fcgid-script
	    </FilesMatch>
67 68 69 70 71 72 73
		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
		<tmpl_else>
		Order allow,deny
		Allow from all
		</tmpl_if>
74 75 76
    </Directory>
  </IfModule>

77 78 79 80 81 82 83 84 85 86 87 88
{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}



89 90 91
</VirtualHost>