Ignore custom Apache Directives in http vhost if it just redirects
Bit similar to #1391 (closed)
I define WSGI directives. But when I enable SSL I get:
Name duplicates previous WSGI daemon
As I have "Rewrite HTTP to HTTPS" enabled in the rewrite tab, there is no need for custom Apache Directives in the http vhost.
This works for me, would it be a general improvement?
--- conf/vhost.conf.master 2018-08-27 15:51:28.161620462 +0200
+++ conf-custom/vhost.conf.master 2019-10-16 11:14:22.748113295 +0200
@@ -522,7 +522,16 @@
# WEBDAV END
</IfModule>
+<tmpl_if name='ssl_enabled'>
+<tmpl_var name='apache_directives'>
+<tmpl_else>
+<tmpl_if name='rewrite_to_https' op='==' value='y'>
+# skipping apache_directives, as that will be handled by the ssl vhost
+<tmpl_else>
<tmpl_var name='apache_directives'>
+</tmpl_if>
+</tmpl_if>
+
<tmpl_hook name='apache2_vhost:vhost_footer'>
</VirtualHost>