default redirect to https

This commit is contained in:
Peter Hormanns 2017-10-02 15:50:37 +02:00
parent 449b41159c
commit 5c452385b9
2 changed files with 8 additions and 4 deletions

View File

@ -250,16 +250,16 @@ public class DomainProcessorFactory implements EntityProcessorFactory {
"chown " + userName + ":" + pacName + " " + domainDir + "/" + subDir "chown " + userName + ":" + pacName + " " + domainDir + "/" + subDir
)); ));
} }
templateVars.put("protocol", "http"); templateVars.put("www", Boolean.FALSE);
domDirsProcessor.appendProcessor( domDirsProcessor.appendProcessor(
new CreateFileProcessor("/de/hsadmin/mods/dom/htaccess.vm", templateVars, dom, domainDir + "/htdocs/.htaccess", userName, pacName, "644", false) new CreateFileProcessor("/de/hsadmin/mods/dom/htaccess.vm", templateVars, dom, domainDir + "/htdocs/.htaccess", userName, pacName, "644", false)
); );
templateVars.put("protocol", "https"); templateVars.put("www", Boolean.TRUE);
domDirsProcessor.appendProcessor( domDirsProcessor.appendProcessor(
new CreateFileProcessor("/de/hsadmin/mods/dom/htaccess.vm", templateVars, dom, domainDir + "/htdocs-ssl/.htaccess", userName, pacName, "644", false) new CreateFileProcessor("/de/hsadmin/mods/dom/htaccess.vm", templateVars, dom, domainDir + "/htdocs-ssl/.htaccess", userName, pacName, "644", false)
); );
domDirsProcessor.appendProcessor( domDirsProcessor.appendProcessor(
new CreateFileProcessor("/de/hsadmin/mods/dom/index.html.vm", templateVars, dom, domainDir + "/subs/www/index.html", userName, pacName, "644", false) new CreateFileProcessor("/de/hsadmin/mods/dom/htaccess.vm", templateVars, dom, domainDir + "/subs/www/.htaccess", userName, pacName, "644", false)
); );
domDirsProcessor.appendProcessor( domDirsProcessor.appendProcessor(
new CreateFileProcessor("/de/hsadmin/mods/dom/index.html.vm", templateVars, dom, domainDir + "/subs-ssl/www/index.html", userName, pacName, "644", false) new CreateFileProcessor("/de/hsadmin/mods/dom/index.html.vm", templateVars, dom, domainDir + "/subs-ssl/www/index.html", userName, pacName, "644", false)

View File

@ -1 +1,5 @@
Redirect permanent / ${protocol}://www.${dom.name}/ #if( ${www} )
Redirect permanent / https://www.${dom.name}/
#else
Redirect permanent / https://${dom.name}/
#end