Create app and app-ssl directories for new domains.
This commit is contained in:
parent
90350b0ca0
commit
a210317755
@ -26,12 +26,8 @@ import de.hsadmin.mods.user.UnixUser;
|
||||
|
||||
public class DomainProcessorFactory implements EntityProcessorFactory {
|
||||
|
||||
private static final String[] DYNAMIC_STRUCTURE = new String[] {
|
||||
"htdocs", "htdocs-ssl", "subs", "subs/www", "subs-ssl", "subs-ssl/www", "cgi", "fastcgi", "cgi-ssl", "fastcgi-ssl", "etc", "var"
|
||||
};
|
||||
|
||||
private static final String[] STATIC_STRUCTURE = new String[] {
|
||||
"htdocs", "htdocs-ssl", "subs", "subs/www", "subs-ssl", "subs-ssl/www", "etc", "var"
|
||||
private static final String[] DOM_STRUCTURE = new String[] {
|
||||
"htdocs", "htdocs-ssl", "subs", "subs/www", "subs-ssl", "subs-ssl/www", "cgi", "fastcgi", "cgi-ssl", "fastcgi-ssl", "app", "app-ssl", "etc", "var"
|
||||
};
|
||||
|
||||
public <T extends AbstractEntity> Processor createCreateProcessor(EntityManager em, T entity) throws ProcessorException {
|
||||
@ -210,7 +206,6 @@ public class DomainProcessorFactory implements EntityProcessorFactory {
|
||||
String domsDir = homeDir + "/doms";
|
||||
String userName = domUser.getName();
|
||||
String domainDir = domsDir + "/" + dom.getName();
|
||||
String[] subDirs = dom.isDynamic() ? DYNAMIC_STRUCTURE : STATIC_STRUCTURE;
|
||||
String httpdRights = "";
|
||||
if (pacName != userName) {
|
||||
httpdRights =
|
||||
@ -227,7 +222,7 @@ public class DomainProcessorFactory implements EntityProcessorFactory {
|
||||
"chown " + userName + ":httpd " + domainDir
|
||||
);
|
||||
CompoundProcessor domDirsProcessor = new CompoundProcessor(mkDomainDirProzessor);
|
||||
for (String subDir : subDirs) {
|
||||
for (String subDir : DOM_STRUCTURE) {
|
||||
domDirsProcessor.appendProcessor(new ShellProcessor(
|
||||
"mkdir --mode=755 --parents " + domainDir + "/" + subDir + " && " +
|
||||
"chown " + userName + ":" + pacName + " " + domainDir + "/" + subDir
|
||||
|
@ -67,8 +67,8 @@
|
||||
RewriteCond %{HTTP_HOST} ^(.+)\.{DOM_HOSTNAME}\.?(:80)?$ [novary]
|
||||
RewriteCond /home/doms/${dom.name}/subs/#[[${tolower:%1} ]]# !-d
|
||||
RewriteRule ^(.*) - [redirect=404,last]
|
||||
#end
|
||||
|
||||
#end
|
||||
#if( ${dynamicWeb} )
|
||||
AddType application/x-httpd-php .php .php5 .php4 .php3
|
||||
Action application/x-httpd-php /fastcgi-bin/phpstub
|
||||
|
Loading…
Reference in New Issue
Block a user