New domain options and properties for Debian Bookworm #1

Closed
hsh-timotheuspokorra wants to merge 41 commits from TP-202311-vhost-bookworm into rel_4.0
8 changed files with 64 additions and 2 deletions
Showing only changes of commit 2c4af11660 - Show all commits

View File

@ -209,6 +209,14 @@ INSERT INTO domain_option (domain_option_name)
VALUES ('autoconfig'); VALUES ('autoconfig');
INSERT INTO domain_option (domain_option_name) INSERT INTO domain_option (domain_option_name)
VALUES ('dkim'); VALUES ('dkim');
INSERT INTO domain_option (domain_option_name)
VALUES ('passenger');
INSERT INTO domain_option (domain_option_name)
VALUES ('passengerfriendlyerrorpages');
INSERT INTO domain_option (domain_option_name)
VALUES ('cgi');
INSERT INTO domain_option (domain_option_name)
VALUES ('fastcgi');
-- --
-- table: price_list -- table: price_list

View File

@ -83,3 +83,8 @@ INSERT INTO price (article_number, price, vat, price_list) VALUES (3125, 80, 19.
INSERT INTO price (article_number, price, vat, price_list) VALUES (3151, 160, 19.0, 1); INSERT INTO price (article_number, price, vat, price_list) VALUES (3151, 160, 19.0, 1);
INSERT INTO price (article_number, price, vat, price_list) VALUES (2017, 2, 19.0, 1); INSERT INTO price (article_number, price, vat, price_list) VALUES (2017, 2, 19.0, 1);
INSERT INTO domain_option (domain_option_name) VALUES ('passenger');
INSERT INTO domain_option (domain_option_name) VALUES ('passengerfriendlyerrorpages');
INSERT INTO domain_option (domain_option_name) VALUES ('cgi');
INSERT INTO domain_option (domain_option_name) VALUES ('fastcgi');

View File

@ -26,21 +26,32 @@
</Directory> </Directory>
<Directory /home/doms/${dom.name}/> <Directory /home/doms/${dom.name}/>
#if( ${passenger} )
PassengerEnabled On PassengerEnabled On
#else
PassengerEnabled Off
#end
#if( ${passengerfriendlyerrorpages} )
PassengerFriendlyErrorPages On
#end
AllowOverride AuthConfig FileInfo Indexes Limit Options=ExecCGI,IncludesNoExec,Indexes,MultiViews,SymLinksIfOwnerMatch,PassengerNodejs,PassengerPython,PassengerRuby,PassengerAppEnv AllowOverride AuthConfig FileInfo Indexes Limit Options=ExecCGI,IncludesNoExec,Indexes,MultiViews,SymLinksIfOwnerMatch,PassengerNodejs,PassengerPython,PassengerRuby,PassengerAppEnv
</Directory> </Directory>
#if( ${cgi} )
<Location /cgi-bin/> <Location /cgi-bin/>
PassengerEnabled Off PassengerEnabled Off
SetHandler cgi-script SetHandler cgi-script
Options +ExecCGI +IncludesNoExec -Indexes -MultiViews +SymLinksIfOwnerMatch Options +ExecCGI +IncludesNoExec -Indexes -MultiViews +SymLinksIfOwnerMatch
</Location> </Location>
#end
#if( ${fastcgi} )
<Location /fastcgi-bin/> <Location /fastcgi-bin/>
PassengerEnabled Off PassengerEnabled Off
SetHandler fcgid-script SetHandler fcgid-script
Options +ExecCGI +IncludesNoExec -Indexes -MultiViews +SymLinksIfOwnerMatch Options +ExecCGI +IncludesNoExec -Indexes -MultiViews +SymLinksIfOwnerMatch
</Location> </Location>
#end
#if( ${autoconfig} ) #if( ${autoconfig} )
<Location /autodiscover/autodiscover.xml> <Location /autodiscover/autodiscover.xml>
@ -104,21 +115,32 @@
</Directory> </Directory>
<Directory /home/doms/${dom.name}/> <Directory /home/doms/${dom.name}/>
#if( ${passenger} )
PassengerEnabled On PassengerEnabled On
#else
PassengerEnabled Off
#end
#if( ${passengerfriendlyerrorpages} )
PassengerFriendlyErrorPages On
#end
AllowOverride AuthConfig FileInfo Indexes Limit Options=ExecCGI,IncludesNoExec,Indexes,MultiViews,SymLinksIfOwnerMatch,PassengerNodejs,PassengerPython,PassengerRuby,PassengerAppEnv AllowOverride AuthConfig FileInfo Indexes Limit Options=ExecCGI,IncludesNoExec,Indexes,MultiViews,SymLinksIfOwnerMatch,PassengerNodejs,PassengerPython,PassengerRuby,PassengerAppEnv
</Directory> </Directory>
#if( ${cgi} )
<Location /cgi-bin/> <Location /cgi-bin/>
PassengerEnabled Off PassengerEnabled Off
SetHandler cgi-script SetHandler cgi-script
Options +ExecCGI +IncludesNoExec -Indexes -MultiViews +SymLinksIfOwnerMatch Options +ExecCGI +IncludesNoExec -Indexes -MultiViews +SymLinksIfOwnerMatch
</Location> </Location>
#end
#if( ${fastcgi} )
<Location /fastcgi-bin/> <Location /fastcgi-bin/>
PassengerEnabled Off PassengerEnabled Off
SetHandler fcgid-script SetHandler fcgid-script
Options +ExecCGI +IncludesNoExec -Indexes -MultiViews +SymLinksIfOwnerMatch Options +ExecCGI +IncludesNoExec -Indexes -MultiViews +SymLinksIfOwnerMatch
</Location> </Location>
#end
#if( ${autoconfig} ) #if( ${autoconfig} )
<Location /autodiscover/autodiscover.xml> <Location /autodiscover/autodiscover.xml>

View File

@ -9,6 +9,10 @@ domainoption.includes=Includes
domainoption.indexes=Indexes domainoption.indexes=Indexes
domainoption.multiviews=MultiViews domainoption.multiviews=MultiViews
domainoption.php=PHP domainoption.php=PHP
domainoption.passenger=Passenger
domainoption.passengerfriendlyerrorpages=PassengerFriendlyErrorPages
domainoption.cgi=CGI
domainoption.fastcgi=FCGI
yes=Yes yes=Yes
no=No no=No
pac=packet pac=packet

View File

@ -9,6 +9,10 @@ domainoption.includes=Includes
domainoption.indexes=Indexes domainoption.indexes=Indexes
domainoption.multiviews=MultiViews domainoption.multiviews=MultiViews
domainoption.php=PHP domainoption.php=PHP
domainoption.passenger=Passenger
domainoption.passengerfriendlyerrorpages=PassengerFriendlyErrorPages
domainoption.cgi=CGI
domainoption.fastcgi=FCGI
yes=Ja yes=Ja
no=Nein no=Nein
pac=Paket pac=Paket

View File

@ -30,6 +30,10 @@ public class DomainModuleImpl extends AbstractModuleImpl {
public static final String DOMOPT_LETSENCRYPT = "letsencrypt"; public static final String DOMOPT_LETSENCRYPT = "letsencrypt";
public static final String DOMOPT_AUTOCONFIG = "autoconfig"; public static final String DOMOPT_AUTOCONFIG = "autoconfig";
public static final String DOMOPT_DKIM = "dkim"; public static final String DOMOPT_DKIM = "dkim";
public static final String DOMOPT_PASSENGER = "passenger";
public static final String DOMOPT_PASSENGERFRIENDLYERRORPAGES = "passengerfriendlyerrorpages";
public static final String DOMOPT_CGI = "cgi";
public static final String DOMOPT_FASTCGI = "fastcgi";
public static final String[] ALL_DOMOPTS = public static final String[] ALL_DOMOPTS =
new String[] { new String[] {
@ -41,7 +45,11 @@ public class DomainModuleImpl extends AbstractModuleImpl {
DOMOPT_BACKUPFOREXTERNALMX, DOMOPT_BACKUPFOREXTERNALMX,
DOMOPT_LETSENCRYPT, DOMOPT_LETSENCRYPT,
DOMOPT_AUTOCONFIG, DOMOPT_AUTOCONFIG,
DOMOPT_DKIM DOMOPT_DKIM,
DOMOPT_PASSENGER,
DOMOPT_PASSENGERFRIENDLYERRORPAGES,
DOMOPT_CGI,
DOMOPT_FASTCGI
}; };
public static final String[] DEFAULT_DOMOPTS = public static final String[] DEFAULT_DOMOPTS =
new String[] { new String[] {
@ -52,7 +60,10 @@ public class DomainModuleImpl extends AbstractModuleImpl {
DOMOPT_INCLUDES, DOMOPT_INCLUDES,
DOMOPT_LETSENCRYPT, DOMOPT_LETSENCRYPT,
DOMOPT_AUTOCONFIG, DOMOPT_AUTOCONFIG,
DOMOPT_DKIM DOMOPT_DKIM,
DOMOPT_PASSENGER,
DOMOPT_CGI,
DOMOPT_FASTCGI
}; };
@Override @Override

View File

@ -27,6 +27,10 @@ public class DomainOptionValues extends DefaultSelectableValues {
list.add(new BooleanListValue("letsencrypt")); list.add(new BooleanListValue("letsencrypt"));
list.add(new BooleanListValue("autoconfig")); list.add(new BooleanListValue("autoconfig"));
list.add(new BooleanListValue("dkim")); list.add(new BooleanListValue("dkim"));
list.add(new BooleanListValue("passenger"));
list.add(new BooleanListValue("passengerfriendlyerrorpages"));
list.add(new BooleanListValue("cgi"));
list.add(new BooleanListValue("fastcgi"));
return list; return list;
} }

View File

@ -263,6 +263,10 @@ public class DomainProcessorFactory implements EntityProcessorFactory {
ifOption(templateVars, query, "htdocsfallback", Boolean.TRUE, Boolean.FALSE); ifOption(templateVars, query, "htdocsfallback", Boolean.TRUE, Boolean.FALSE);
ifOption(templateVars, query, "letsencrypt", Boolean.TRUE, Boolean.FALSE); ifOption(templateVars, query, "letsencrypt", Boolean.TRUE, Boolean.FALSE);
ifOption(templateVars, query, "autoconfig", Boolean.TRUE, Boolean.FALSE); ifOption(templateVars, query, "autoconfig", Boolean.TRUE, Boolean.FALSE);
ifOption(templateVars, query, "passenger", Boolean.TRUE, Boolean.FALSE);
ifOption(templateVars, query, "passengerfriendlyerrorpages", Boolean.TRUE, Boolean.FALSE);
ifOption(templateVars, query, "cgi", Boolean.TRUE, Boolean.FALSE);
ifOption(templateVars, query, "fastcgi", Boolean.TRUE, Boolean.FALSE);
final boolean isSetLetsencryptOption = templateVars.get("letsencrypt").equals(Boolean.TRUE); final boolean isSetLetsencryptOption = templateVars.get("letsencrypt").equals(Boolean.TRUE);
final Processor domSetupProcessor = new CompoundProcessor( final Processor domSetupProcessor = new CompoundProcessor(
isSetLetsencryptOption ? new NullProcessor() : new ShellProcessor("rm -f /etc/apache2/pems-generated/" + domName + ".crt"), isSetLetsencryptOption ? new NullProcessor() : new ShellProcessor("rm -f /etc/apache2/pems-generated/" + domName + ".crt"),