Skip to content

Commit 472d7b9

Browse files
author
Marius Burkard
committed
- removed unneccessary checks for apache > 2.2
1 parent e78ec10 commit 472d7b9

File tree

3 files changed

+12
-44
lines changed

3 files changed

+12
-44
lines changed

install/tpl/apache_ispconfig.conf.master

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,9 @@
44
ServerTokens ProductOnly
55
ServerSignature Off
66

7-
<tmpl_if name='apache_version' op='>=' value='2.4' format='version'>
87
<IfModule mod_ssl.c>
98
SSLStaplingCache shmcb:/var/run/ocsp(128000)
109
</IfModule>
11-
</tmpl_if>
1210

1311
################################################
1412
# ISPConfig Logfile configuration for vlogger

install/tpl/apache_ispconfig.vhost.master

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
######################################################
55

66
<tmpl_var name="vhost_port_listen"> Listen <tmpl_var name="vhost_port">
7-
<tmpl_if name='apache_version' op='<' value='2.4' format='version'>NameVirtualHost *:<tmpl_var name="vhost_port"></tmpl_if>
87

98
<VirtualHost _default_:<tmpl_var name="vhost_port">>
109
ServerAdmin webmaster@localhost

server/conf/vhost.conf.master

Lines changed: 12 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -256,24 +256,16 @@ DocumentRoot <tmpl_var name='web_document_root_www'>
256256
</Directory>
257257
<Directory {tmpl_var name='web_document_root_www'}>
258258
<FilesMatch "\.php[345]?$">
259-
<tmpl_if name='apache_version' op='>=' value='2.4' format='version'>
260-
<If "-f %{DOCUMENT_ROOT} . '/' . %{REQUEST_URI}">
261-
SetHandler php-fcgi
262-
</If>
263-
<tmpl_else>
264-
SetHandler php-fcgi
265-
</tmpl_if>
259+
<If "-f %{DOCUMENT_ROOT} . '/' . %{REQUEST_URI}">
260+
SetHandler php-fcgi
261+
</If>
266262
</FilesMatch>
267263
</Directory>
268264
<Directory {tmpl_var name='web_document_root'}>
269265
<FilesMatch "\.php[345]?$">
270-
<tmpl_if name='apache_version' op='>=' value='2.4' format='version'>
271-
<If "-f %{DOCUMENT_ROOT} . '/' . %{REQUEST_URI}">
272-
SetHandler php-fcgi
273-
</If>
274-
<tmpl_else>
275-
SetHandler php-fcgi
276-
</tmpl_if>
266+
<If "-f %{DOCUMENT_ROOT} . '/' . %{REQUEST_URI}">
267+
SetHandler php-fcgi
268+
</If>
277269
</FilesMatch>
278270
</Directory>
279271
Action php-fcgi /php-fcgi virtual
@@ -290,27 +282,19 @@ DocumentRoot <tmpl_var name='web_document_root_www'>
290282
#ProxyPassMatch ^/(.*\.php[345]?(/.*)?)$ fcgi://127.0.0.1:<tmpl_var name='fpm_port'><tmpl_var name='web_document_root'>/$1
291283
<Directory {tmpl_var name='web_document_root'}>
292284
<FilesMatch "\.php[345]?$">
293-
<tmpl_if name='apache_version' op='>=' value='2.4' format='version'>
294-
<If "-f %{DOCUMENT_ROOT} . '/' . %{REQUEST_URI}">
295-
SetHandler "proxy:fcgi://127.0.0.1:<tmpl_var name='fpm_port'>"
296-
</If>
297-
<tmpl_else>
298-
SetHandler "proxy:fcgi://127.0.0.1:<tmpl_var name='fpm_port'>"
299-
</tmpl_if>
285+
<If "-f %{DOCUMENT_ROOT} . '/' . %{REQUEST_URI}">
286+
SetHandler "proxy:fcgi://127.0.0.1:<tmpl_var name='fpm_port'>"
287+
</If>
300288
</FilesMatch>
301289
</Directory>
302290
</tmpl_if>
303291
<tmpl_if name='use_socket'>
304292
#ProxyPassMatch ^/(.*\.php[345]?(/.*)?)$ unix://<tmpl_var name='fpm_socket'>|fcgi://localhost/<tmpl_var name='web_document_root'>/$1
305293
<Directory {tmpl_var name='web_document_root'}>
306294
<FilesMatch "\.php[345]?$">
307-
<tmpl_if name='apache_version' op='>=' value='2.4' format='version'>
308-
<If "-f %{DOCUMENT_ROOT} . '/' . %{REQUEST_URI}">
309-
SetHandler "proxy:unix:<tmpl_var name='fpm_socket'>|fcgi://localhost"
310-
</If>
311-
<tmpl_else>
312-
SetHandler "proxy:unix:<tmpl_var name='fpm_socket'>|fcgi://localhost"
313-
</tmpl_if>
295+
<If "-f %{DOCUMENT_ROOT} . '/' . %{REQUEST_URI}">
296+
SetHandler "proxy:unix:<tmpl_var name='fpm_socket'>|fcgi://localhost"
297+
</If>
314298
</FilesMatch>
315299
</Directory>
316300
</tmpl_if>
@@ -325,30 +309,19 @@ DocumentRoot <tmpl_var name='web_document_root_www'>
325309
<tmpl_else>
326310
<tmpl_if name='rewrite_to_https' op='==' value='y'>
327311
RewriteCond %{HTTPS} off
328-
<tmpl_if name='apache_version' op='<' value='2.4' format='version'>RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/
329-
</tmpl_if>
330312
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
331313
</tmpl_if>
332314
</tmpl_if>
333315
<tmpl_if name='seo_redirect_enabled'>
334316
RewriteCond %{HTTP_HOST} <tmpl_var name='seo_redirect_operator'>^<tmpl_var name='seo_redirect_origin_domain'>$ [NC]
335-
<tmpl_if name='apache_version' op='<' value='2.4' format='version'>
336-
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/
337-
</tmpl_if>
338317
RewriteRule ^ http<tmpl_if name='ssl_enabled'>s</tmpl_if>://<tmpl_var name='seo_redirect_target_domain'>%{REQUEST_URI} [R=301,NE,L]
339318
</tmpl_if>
340319
<tmpl_loop name="alias_seo_redirects">
341320
RewriteCond %{HTTP_HOST} <tmpl_var name='alias_seo_redirect_operator'>^<tmpl_var name='alias_seo_redirect_origin_domain'>$ [NC]
342-
<tmpl_if name='apache_version' op='<' value='2.4' format='version'>
343-
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/
344-
</tmpl_if>
345321
RewriteRule ^ http<tmpl_if name='ssl_enabled'>s</tmpl_if>://<tmpl_var name='alias_seo_redirect_target_domain'>%{REQUEST_URI} [R=301,NE,L]
346322
</tmpl_loop>
347323
<tmpl_loop name="redirects">
348324
RewriteCond %{HTTP_HOST} <tmpl_var name='rewrite_domain'>$ [NC]
349-
<tmpl_if name='apache_version' op='<' value='2.4' format='version'>
350-
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/
351-
</tmpl_if>
352325
<tmpl_if name="rewrite_is_url" op="==" value="n">
353326
RewriteCond %{REQUEST_URI} !^/webdav/
354327
RewriteCond %{REQUEST_URI} !^/php-fcgi/
@@ -361,8 +334,6 @@ DocumentRoot <tmpl_var name='web_document_root_www'>
361334
<tmpl_else>
362335
<tmpl_if name='rewrite_to_https' op='==' value='y'>
363336
RewriteCond %{HTTPS} off
364-
<tmpl_if name='apache_version' op='<' value='2.4' format='version'>RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/
365-
</tmpl_if>
366337
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L,NE]
367338
</tmpl_if>
368339
</tmpl_if>

0 commit comments

Comments
 (0)