Commit 472d7b91 authored by Marius Burkard's avatar Marius Burkard

- removed unneccessary checks for apache > 2.2

parent e78ec10f
......@@ -4,11 +4,9 @@
ServerTokens ProductOnly
ServerSignature Off
<tmpl_if name='apache_version' op='>=' value='2.4' format='version'>
<IfModule mod_ssl.c>
SSLStaplingCache shmcb:/var/run/ocsp(128000)
</IfModule>
</tmpl_if>
################################################
# ISPConfig Logfile configuration for vlogger
......
......@@ -4,7 +4,6 @@
######################################################
<tmpl_var name="vhost_port_listen"> Listen <tmpl_var name="vhost_port">
<tmpl_if name='apache_version' op='<' value='2.4' format='version'>NameVirtualHost *:<tmpl_var name="vhost_port"></tmpl_if>
<VirtualHost _default_:<tmpl_var name="vhost_port">>
ServerAdmin webmaster@localhost
......
......@@ -256,24 +256,16 @@ DocumentRoot <tmpl_var name='web_document_root_www'>
</Directory>
<Directory {tmpl_var name='web_document_root_www'}>
<FilesMatch "\.php[345]?$">
<tmpl_if name='apache_version' op='>=' value='2.4' format='version'>
<If "-f %{DOCUMENT_ROOT} . '/' . %{REQUEST_URI}">
SetHandler php-fcgi
</If>
<tmpl_else>
SetHandler php-fcgi
</tmpl_if>
<If "-f %{DOCUMENT_ROOT} . '/' . %{REQUEST_URI}">
SetHandler php-fcgi
</If>
</FilesMatch>
</Directory>
<Directory {tmpl_var name='web_document_root'}>
<FilesMatch "\.php[345]?$">
<tmpl_if name='apache_version' op='>=' value='2.4' format='version'>
<If "-f %{DOCUMENT_ROOT} . '/' . %{REQUEST_URI}">
SetHandler php-fcgi
</If>
<tmpl_else>
SetHandler php-fcgi
</tmpl_if>
<If "-f %{DOCUMENT_ROOT} . '/' . %{REQUEST_URI}">
SetHandler php-fcgi
</If>
</FilesMatch>
</Directory>
Action php-fcgi /php-fcgi virtual
......@@ -290,13 +282,9 @@ DocumentRoot <tmpl_var name='web_document_root_www'>
#ProxyPassMatch ^/(.*\.php[345]?(/.*)?)$ fcgi://127.0.0.1:<tmpl_var name='fpm_port'><tmpl_var name='web_document_root'>/$1
<Directory {tmpl_var name='web_document_root'}>
<FilesMatch "\.php[345]?$">
<tmpl_if name='apache_version' op='>=' value='2.4' format='version'>
<If "-f %{DOCUMENT_ROOT} . '/' . %{REQUEST_URI}">
SetHandler "proxy:fcgi://127.0.0.1:<tmpl_var name='fpm_port'>"
</If>
<tmpl_else>
SetHandler "proxy:fcgi://127.0.0.1:<tmpl_var name='fpm_port'>"
</tmpl_if>
<If "-f %{DOCUMENT_ROOT} . '/' . %{REQUEST_URI}">
SetHandler "proxy:fcgi://127.0.0.1:<tmpl_var name='fpm_port'>"
</If>
</FilesMatch>
</Directory>
</tmpl_if>
......@@ -304,13 +292,9 @@ DocumentRoot <tmpl_var name='web_document_root_www'>
#ProxyPassMatch ^/(.*\.php[345]?(/.*)?)$ unix://<tmpl_var name='fpm_socket'>|fcgi://localhost/<tmpl_var name='web_document_root'>/$1
<Directory {tmpl_var name='web_document_root'}>
<FilesMatch "\.php[345]?$">
<tmpl_if name='apache_version' op='>=' value='2.4' format='version'>
<If "-f %{DOCUMENT_ROOT} . '/' . %{REQUEST_URI}">
SetHandler "proxy:unix:<tmpl_var name='fpm_socket'>|fcgi://localhost"
</If>
<tmpl_else>
SetHandler "proxy:unix:<tmpl_var name='fpm_socket'>|fcgi://localhost"
</tmpl_if>
<If "-f %{DOCUMENT_ROOT} . '/' . %{REQUEST_URI}">
SetHandler "proxy:unix:<tmpl_var name='fpm_socket'>|fcgi://localhost"
</If>
</FilesMatch>
</Directory>
</tmpl_if>
......@@ -325,30 +309,19 @@ DocumentRoot <tmpl_var name='web_document_root_www'>
<tmpl_else>
<tmpl_if name='rewrite_to_https' op='==' value='y'>
RewriteCond %{HTTPS} off
<tmpl_if name='apache_version' op='<' value='2.4' format='version'>RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/
</tmpl_if>
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
</tmpl_if>
</tmpl_if>
<tmpl_if name='seo_redirect_enabled'>
RewriteCond %{HTTP_HOST} <tmpl_var name='seo_redirect_operator'>^<tmpl_var name='seo_redirect_origin_domain'>$ [NC]
<tmpl_if name='apache_version' op='<' value='2.4' format='version'>
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/
</tmpl_if>
RewriteRule ^ http<tmpl_if name='ssl_enabled'>s</tmpl_if>://<tmpl_var name='seo_redirect_target_domain'>%{REQUEST_URI} [R=301,NE,L]
</tmpl_if>
<tmpl_loop name="alias_seo_redirects">
RewriteCond %{HTTP_HOST} <tmpl_var name='alias_seo_redirect_operator'>^<tmpl_var name='alias_seo_redirect_origin_domain'>$ [NC]
<tmpl_if name='apache_version' op='<' value='2.4' format='version'>
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/
</tmpl_if>
RewriteRule ^ http<tmpl_if name='ssl_enabled'>s</tmpl_if>://<tmpl_var name='alias_seo_redirect_target_domain'>%{REQUEST_URI} [R=301,NE,L]
</tmpl_loop>
<tmpl_loop name="redirects">
RewriteCond %{HTTP_HOST} <tmpl_var name='rewrite_domain'>$ [NC]
<tmpl_if name='apache_version' op='<' value='2.4' format='version'>
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/
</tmpl_if>
<tmpl_if name="rewrite_is_url" op="==" value="n">
RewriteCond %{REQUEST_URI} !^/webdav/
RewriteCond %{REQUEST_URI} !^/php-fcgi/
......@@ -361,8 +334,6 @@ DocumentRoot <tmpl_var name='web_document_root_www'>
<tmpl_else>
<tmpl_if name='rewrite_to_https' op='==' value='y'>
RewriteCond %{HTTPS} off
<tmpl_if name='apache_version' op='<' value='2.4' format='version'>RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/
</tmpl_if>
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L,NE]
</tmpl_if>
</tmpl_if>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment