apache_ispconfig.vhost.master 4.53 KB
Newer Older
tbrehm's avatar
tbrehm committed
1 2 3 4 5
######################################################
# This virtual host contains the configuration
# for the ISPConfig controlpanel
######################################################

6 7
<tmpl_var name="vhost_port_listen"> Listen <tmpl_var name="vhost_port">
NameVirtualHost *:<tmpl_var name="vhost_port">
tbrehm's avatar
tbrehm committed
8

9
<VirtualHost _default_:<tmpl_var name="vhost_port">>
redray's avatar
redray committed
10
  ServerAdmin webmaster@localhost
C Soellinger's avatar
C Soellinger committed
11

12 13 14
  <FilesMatch "\.ph(p3?|tml)$">
    SetHandler None
  </FilesMatch>
C Soellinger's avatar
C Soellinger committed
15

16
  <IfModule mod_fcgid.c>
17
    DocumentRoot /var/www/ispconfig/
redray's avatar
redray committed
18
    SuexecUserGroup ispconfig ispconfig
19
    <Directory /var/www/ispconfig/>
20
      Options -Indexes +FollowSymLinks +MultiViews +ExecCGI
redray's avatar
redray committed
21
      AllowOverride AuthConfig Indexes Limit Options FileInfo
C Soellinger's avatar
C Soellinger committed
22 23 24
      <FilesMatch "\.php$">
        SetHandler fcgid-script
      </FilesMatch>
25
      FCGIWrapper /var/www/php-fcgi-scripts/ispconfig/.php-fcgi-starter .php
26
      <tmpl_if name='apache_version' op='>' value='2.2' format='version'>
C Soellinger's avatar
C Soellinger committed
27 28
      Require all granted
      <tmpl_else>
redray's avatar
redray committed
29 30
      Order allow,deny
      Allow from all
C Soellinger's avatar
C Soellinger committed
31
      </tmpl_if>
redray's avatar
redray committed
32
    </Directory>
33
    IPCCommTimeout  7200
C Soellinger's avatar
C Soellinger committed
34
    MaxRequestLen 15728640
redray's avatar
redray committed
35
  </IfModule>
C Soellinger's avatar
C Soellinger committed
36

37 38
  <IfModule mpm_itk_module>
    DocumentRoot /usr/local/ispconfig/interface/web/
C Soellinger's avatar
C Soellinger committed
39
    AssignUserId ispconfig ispconfig
40 41 42
    AddType application/x-httpd-php .php
    <Directory /usr/local/ispconfig/interface/web>
      # php_admin_value open_basedir "/usr/local/ispconfig/interface:/usr/share:/tmp"
43
      Options +FollowSymLinks
44
      AllowOverride None
45
      <tmpl_if name='apache_version' op='>' value='2.2' format='version'>
C Soellinger's avatar
C Soellinger committed
46 47
      Require all granted
      <tmpl_else>
48 49
      Order allow,deny
      Allow from all
C Soellinger's avatar
C Soellinger committed
50 51
      </tmpl_if>
      php_value magic_quotes_gpc        0
52 53
    </Directory>
  </IfModule>
C Soellinger's avatar
C Soellinger committed
54

redray's avatar
redray committed
55 56 57
  # ErrorLog /var/log/apache2/error.log
  # CustomLog /var/log/apache2/access.log combined
  ServerSignature Off
C Soellinger's avatar
C Soellinger committed
58

59 60 61 62
  <IfModule mod_security2.c>
    SecRuleEngine Off
  </IfModule>

63
  # SSL Configuration
64
  <tmpl_var name="ssl_comment">SSLEngine On
65 66 67
  <tmpl_if name='apache_version' op='>=' value='2.3.16' format='version'>
  <tmpl_var name="ssl_comment">SSLProtocol All -SSLv3
  <tmpl_else>
68
  <tmpl_var name="ssl_comment">SSLProtocol All -SSLv2 -SSLv3
69
  </tmpl_if>
70 71 72
  <tmpl_var name="ssl_comment">SSLCertificateFile /usr/local/ispconfig/interface/ssl/ispserver.crt
  <tmpl_var name="ssl_comment">SSLCertificateKeyFile /usr/local/ispconfig/interface/ssl/ispserver.key
  <tmpl_var name="ssl_bundle_comment">SSLCACertificateFile /usr/local/ispconfig/interface/ssl/ispserver.bundle
redray's avatar
redray committed
73

74
  <tmpl_var name="ssl_comment">SSLCipherSuite ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:ECDHE-ECDSA-DES-CBC3-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:!DSS
75
  <tmpl_var name="ssl_comment">SSLHonorCipherOrder On
76 77 78 79 80 81
  <tmpl_if name='apache_version' op='>=' value='2.4.3' format='version'>
  <tmpl_var name="ssl_comment">SSLCompression Off
  </tmpl_if>
  <tmpl_if name='apache_version' op='>=' value='2.4.11' format='version'>
  <tmpl_var name="ssl_comment">SSLSessionTickets Off
  </tmpl_if>
82 83 84

  <IfModule mod_headers.c>
    Header always add Strict-Transport-Security "max-age=15768000"
85
	RequestHeader unset Proxy early
86 87
  </IfModule>

88 89 90 91 92
  <tmpl_if name='apache_version' op='>=' value='2.3.3' format='version'>
  <tmpl_var name="ssl_comment">SSLUseStapling On
  <tmpl_var name="ssl_comment">SSLStaplingResponderTimeout 5
  <tmpl_var name="ssl_comment">SSLStaplingReturnResponderErrors Off
  </tmpl_if>
93 94
</VirtualHost>

95
<tmpl_if name='apache_version' op='>=' value='2.3.3' format='version'>
96 97 98 99 100
<IfModule mod_ssl.c>
  <tmpl_var name="ssl_comment">SSLStaplingCache shmcb:/var/run/ocsp(128000)
</IfModule>
</tmpl_if>

101
<Directory /var/www/php-cgi-scripts>
C Soellinger's avatar
C Soellinger committed
102 103 104 105 106 107 108
  AllowOverride None
  <tmpl_if name='apache_version' op='>' value='2.2' format='version'>
  Require all denied
  <tmpl_else>
  Order Deny,Allow
  Deny from all
  </tmpl_if>
109 110 111
</Directory>

<Directory /var/www/php-fcgi-scripts>
C Soellinger's avatar
C Soellinger committed
112 113 114 115 116 117 118 119
  AllowOverride None
  <tmpl_if name='apache_version' op='>' value='2.2' format='version'>
  Require all denied
  <tmpl_else>
  Order Deny,Allow
  Deny from all
  </tmpl_if>
</Directory>