|
1 | | - |
2 | 1 | ###################################################### |
3 | 2 | # This virtual host contains the configuration |
4 | 3 | # for the ISPConfig apps vhost |
|
15 | 14 | SetHandler None |
16 | 15 | </FilesMatch> |
17 | 16 |
|
| 17 | + # SSL Configuration |
| 18 | + <tmpl_var name="ssl_comment">SSLEngine On |
| 19 | + <tmpl_if name='apache_version' op='>=' value='2.3.16' format='version'> |
| 20 | + <tmpl_var name="ssl_comment">SSLProtocol All -SSLv3 -TLSv1 -TLSv1.1 |
| 21 | + <tmpl_else> |
| 22 | + <tmpl_var name="ssl_comment">SSLProtocol All -SSLv2 -SSLv3 |
| 23 | + </tmpl_if> |
| 24 | + <tmpl_var name="ssl_comment">SSLCertificateFile /usr/local/ispconfig/interface/ssl/ispserver.crt |
| 25 | + <tmpl_var name="ssl_comment">SSLCertificateKeyFile /usr/local/ispconfig/interface/ssl/ispserver.key |
| 26 | + <tmpl_var name="ssl_bundle_comment">SSLCACertificateFile /usr/local/ispconfig/interface/ssl/ispserver.bundle |
| 27 | + |
| 28 | + <tmpl_var name="ssl_comment">SSLCipherSuite ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384 |
| 29 | + <tmpl_var name="ssl_comment">SSLHonorCipherOrder On |
| 30 | + <tmpl_if name='apache_version' op='>=' value='2.4.3' format='version'> |
| 31 | + <tmpl_var name="ssl_comment">SSLCompression Off |
| 32 | + </tmpl_if> |
| 33 | + <tmpl_if name='apache_version' op='>=' value='2.4.11' format='version'> |
| 34 | + <tmpl_var name="ssl_comment">SSLSessionTickets Off |
| 35 | + </tmpl_if> |
| 36 | + |
| 37 | + <IfModule mod_headers.c> |
| 38 | + # ISPConfig 3.1 currently requires unsafe-line for both scripts and styles, as well as unsafe-eval |
| 39 | + Header set Content-Security-Policy "default-src 'self' 'unsafe-inline' 'unsafe-eval'; img-src 'self' data:; object-src 'none'" |
| 40 | + <tmpl_var name="ssl_comment">Header set Content-Security-Policy "default-src 'self' 'unsafe-inline' 'unsafe-eval'; img-src 'self' data:; object-src 'none'; upgrade-insecure-requests" |
| 41 | + Header set X-Content-Type-Options: nosniff |
| 42 | + Header set X-Frame-Options: SAMEORIGIN |
| 43 | + Header set X-XSS-Protection: "1; mode=block" |
| 44 | + Header always edit Set-Cookie (.*) "$1; HTTPOnly" |
| 45 | + <tmpl_var name="ssl_comment">Header always edit Set-Cookie (.*) "$1; Secure" |
| 46 | + <IfVersion >= 2.4.7> |
| 47 | + Header setifempty Strict-Transport-Security "max-age=15768000" |
| 48 | + </IfVersion> |
| 49 | + <IfVersion < 2.4.7> |
| 50 | + Header set Strict-Transport-Security "max-age=15768000" |
| 51 | + </IfVersion> |
| 52 | + RequestHeader unset Proxy early |
| 53 | + </IfModule> |
| 54 | + |
| 55 | + <tmpl_if name='apache_version' op='>=' value='2.3.3' format='version'> |
| 56 | + <tmpl_var name="ssl_comment">SSLUseStapling On |
| 57 | + <tmpl_var name="ssl_comment">SSLStaplingResponderTimeout 5 |
| 58 | + <tmpl_var name="ssl_comment">SSLStaplingReturnResponderErrors Off |
| 59 | + </tmpl_if> |
| 60 | +</VirtualHost> |
| 61 | + |
| 62 | +<tmpl_if name='apache_version' op='>=' value='2.3.3' format='version'> |
| 63 | +<IfModule mod_ssl.c> |
| 64 | + <tmpl_var name="ssl_comment">SSLStaplingCache shmcb:/var/run/ocsp(128000) |
| 65 | +</IfModule> |
| 66 | +</tmpl_if> |
| 67 | + |
18 | 68 | <IfModule mod_headers.c> |
19 | 69 | RequestHeader unset Proxy early |
20 | 70 | </IfModule> |
|
55 | 105 | <Directory {tmpl_var name='apps_vhost_dir'}> |
56 | 106 | Options +Indexes +FollowSymLinks +MultiViews +ExecCGI |
57 | 107 | AllowOverride AuthConfig Indexes Limit Options FileInfo |
58 | | - <FilesMatch "\.php$"> |
59 | | - SetHandler fcgid-script |
60 | | - </FilesMatch> |
| 108 | + <FilesMatch "\.php$"> |
| 109 | + SetHandler fcgid-script |
| 110 | + </FilesMatch> |
61 | 111 | FCGIWrapper {tmpl_var name='apps_vhost_basedir'}/php-fcgi-scripts/apps/.php-fcgi-starter .php |
62 | 112 | <tmpl_if name='apache_version' op='>' value='2.2' format='version'> |
63 | 113 | Require all granted |
|
78 | 128 | RewriteRule ^/rspamd/(.*) http://127.0.0.1:11334/$1 [P] |
79 | 129 | {/tmpl_if} |
80 | 130 |
|
| 131 | + |
| 132 | + |
81 | 133 | </VirtualHost> |
0 commit comments