merged
This commit is contained in:
parent
de4a80c248
commit
400c14a23e
@ -311,10 +311,10 @@ public class DomainProcessorFactory implements EntityProcessorFactory {
|
||||
}
|
||||
Processor domSetupProcessor = new CompoundProcessor(
|
||||
createDomainDirectoriesProcessor(dom, templateVars),
|
||||
new CreateFileProcessor(selectVHostTemplate(dom), templateVars, "/etc/apache2/sites-available/" + domName + ".tmp", "root", "root", "644", true),
|
||||
new CreateFileProcessor(selectVHostTemplate(dom), templateVars, iterateMaps.iterator(), "/etc/apache2/sites-available/" + domName + ".tmp", "root", "root", "644", true),
|
||||
new ShellProcessor("ls /etc/apache2/pems/" + pac + ".pem >/dev/null 2>&1 " +
|
||||
"&& sed -i '/SSLCertificate.*default/d' " + "/etc/apache2/sites-available/" + domName + ".tmp" +
|
||||
" && (ls /etc/apache2/pems/" + pac + ".chain.pem >/dev/null 2>&1 || sed -i '/SSLCertificateChain.*" + pac + "/d' " + "/etc/apache2/sites-available/" + domName + ")" +
|
||||
" && (ls /etc/apache2/pems/" + pac + ".chain.pem >/dev/null 2>&1 || sed -i '/SSLCertificateChain.*" + pac + "/d' " + "/etc/apache2/sites-available/" + domName + ".tmp )" +
|
||||
" || sed -i '/SSLCertificate.*" + pac + "/d' " + "/etc/apache2/sites-available/" + domName + ".tmp"),
|
||||
new ShellProcessor(
|
||||
" ( diff -q /etc/apache2/sites-available/" + domName + ".tmp /etc/apache2/sites-available/" + domName + " && rm /etc/apache2/sites-available/" + domName + ".tmp ) " +
|
||||
|
@ -1,4 +1,9 @@
|
||||
<!-- BEGIN: main --><VirtualHost {DOM_IPNUMBER}:80 {DOM_IPNUMBEREX}:80>
|
||||
<!-- BEGIN: main -->#
|
||||
# This file is managed by HSAdmin.
|
||||
# Do not edit manually. Changes will be overwritten.
|
||||
#
|
||||
|
||||
<VirtualHost {DOM_IPNUMBER}:80 {DOM_IPNUMBEREX}:80>
|
||||
|
||||
ServerName {DOM_HOSTNAME}
|
||||
ServerAlias *.{DOM_HOSTNAME}
|
||||
@ -37,8 +42,8 @@
|
||||
RewriteCond %{HTTP_HOST} ^(.+)\.{DOM_HOSTNAME}\.?(:80)?$ [novary]
|
||||
RewriteCond /home/doms/{DOM_HOSTNAME}/subs/${tolower:%1} -d
|
||||
RewriteRule ^(.*) /home/doms/{DOM_HOSTNAME}/subs/${tolower:%1}$1 [last]
|
||||
|
||||
<!-- BEGIN: iterate --> RewriteCond %{REQUEST_URI} !^/cgi-bin/
|
||||
<!-- BEGIN: iterate -->
|
||||
RewriteCond %{REQUEST_URI} !^/cgi-bin/
|
||||
RewriteCond %{REQUEST_URI} !^/fastcgi-bin/
|
||||
RewriteCond %{HTTP_HOST} ^(.+)\.{DOM_HOSTNAME}\.?(:80)?$ [novary]
|
||||
RewriteCond /home/doms/{DOM_HOSTNAME}/subs/${tolower:%1} !-d
|
||||
@ -95,14 +100,14 @@
|
||||
RewriteCond %{HTTP_HOST} ^(.+)\.{DOM_HOSTNAME}\.?(:443)?$ [novary]
|
||||
RewriteCond /home/doms/{DOM_HOSTNAME}/subs-ssl/${tolower:%1} -d
|
||||
RewriteRule ^(.*) /home/doms/{DOM_HOSTNAME}/subs-ssl/${tolower:%1}$1 [last]
|
||||
|
||||
<!-- BEGIN: nosubdomainfallbackforhttps --> RewriteCond %{REQUEST_URI} !^/cgi-bin/
|
||||
<!-- BEGIN: nosubdomainfallbackforhttps -->
|
||||
RewriteCond %{REQUEST_URI} !^/cgi-bin/
|
||||
RewriteCond %{REQUEST_URI} !^/fastcgi-bin/
|
||||
RewriteCond %{HTTP_HOST} ^(.+)\.{DOM_HOSTNAME}\.?(:443)?$ [novary]
|
||||
RewriteCond /home/doms/{DOM_HOSTNAME}/subs-ssl/${tolower:%1} !-d
|
||||
RewriteRule ^(.*) - [redirect=404,last]
|
||||
|
||||
<!-- END: nosubdomainfallbackforhttps --> AddType application/x-httpd-php .php .php5 .php4 .php3
|
||||
<!-- END: nosubdomainfallbackforhttps -->
|
||||
AddType application/x-httpd-php .php .php5 .php4 .php3
|
||||
Action application/x-httpd-php /fastcgi-bin/phpstub
|
||||
|
||||
</VirtualHost>
|
||||
|
@ -1,4 +1,9 @@
|
||||
<!-- BEGIN: main --><VirtualHost {DOM_IPNUMBER}:80 {DOM_IPNUMBEREX}:80>
|
||||
<!-- BEGIN: main -->#
|
||||
# This file is managed by HSAdmin.
|
||||
# Do not edit manually. Changes will be overwritten.
|
||||
#
|
||||
|
||||
<VirtualHost {DOM_IPNUMBER}:80 {DOM_IPNUMBEREX}:80>
|
||||
|
||||
ServerName {DOM_HOSTNAME}
|
||||
ServerAlias *.{DOM_HOSTNAME}
|
||||
@ -30,7 +35,6 @@
|
||||
RewriteCond %{HTTP_HOST} ^(.+)\.{DOM_HOSTNAME}\.?(:80)?$ [novary]
|
||||
RewriteCond /home/doms/{DOM_HOSTNAME}/subs/${tolower:%1} -d
|
||||
RewriteRule ^(.*) /home/doms/{DOM_HOSTNAME}/subs/${tolower:%1}$1 [last]
|
||||
|
||||
<!-- BEGIN: iterate --> RewriteCond %{HTTP_HOST} ^(.+)\.{DOM_HOSTNAME}\.?(:80)?$ [novary]
|
||||
RewriteCond /home/doms/{DOM_HOSTNAME}/subs/${tolower:%1} !-d
|
||||
RewriteRule ^(.*) - [redirect=404,last]
|
||||
@ -80,6 +84,6 @@
|
||||
<!-- BEGIN: nosubdomainfallbackforhttps --> RewriteCond %{HTTP_HOST} ^(.+)\.{DOM_HOSTNAME}\.?(:443)?$ [novary]
|
||||
RewriteCond /home/doms/{DOM_HOSTNAME}/subs-ssl/${tolower:%1} !-d
|
||||
RewriteRule ^(.*) - [redirect=404,last]
|
||||
|
||||
<!-- END: nosubdomainfallbackforhttps --></VirtualHost>
|
||||
<!-- END: nosubdomainfallbackforhttps -->
|
||||
</VirtualHost>
|
||||
<!-- END: main -->
|
@ -1,10 +1,12 @@
|
||||
<!-- BEGIN: main -->### Do not edit this file manually
|
||||
### Generated by HSAdmin Queue Server
|
||||
<!-- BEGIN: main -->#
|
||||
# This file is managed by HSAdmin.
|
||||
# Do not edit manually. Changes will be overwritten.
|
||||
#
|
||||
|
||||
abuse@
|
||||
postmaster@
|
||||
|
||||
################################################################################
|
||||
####################################################
|
||||
|
||||
<!-- BEGIN: iterate -->{DOM}
|
||||
<!-- END: iterate -->
|
||||
|
@ -16,6 +16,7 @@ import de.hsadmin.core.qserv.Processor;
|
||||
import de.hsadmin.core.qserv.ProcessorException;
|
||||
import de.hsadmin.core.qserv.ShellProcessor;
|
||||
import de.hsadmin.core.qserv.TemplateProcessor;
|
||||
import de.hsadmin.core.qserv.CreateFileProcessor;
|
||||
import de.hsadmin.core.qserv.WaitingTasksProcessor;
|
||||
import de.hsadmin.core.util.Config;
|
||||
import de.hsadmin.core.util.PasswordTool;
|
||||
@ -44,12 +45,27 @@ public class PacProcessorFactory implements EntityProcessorFactory {
|
||||
createSudouersProc(hiveValues, pacValuesList),
|
||||
createProftpdConfProc(hiveValues, pacValuesList),
|
||||
createMakePacDirectoryStructure(unixUser),
|
||||
createIfUp(pacName));
|
||||
createIfUp(pacName),
|
||||
createHttpdVirtualProc(pacName, pacValuesList));
|
||||
WaitingTasksProcessor secProcessor = new WaitingTasksProcessor(priProcessor);
|
||||
// secProcessor.appendProcessor(pac.getHiveName(), createSendEMailProc(pacName, customerEMail, emailVars), "send email to customer");
|
||||
return secProcessor;
|
||||
}
|
||||
|
||||
private Processor createHttpdVirtualProc(
|
||||
String pacName, List<Map<String, String>> pacValuesList) throws ProcessorException {
|
||||
Processor domSetupProcessor = new CompoundProcessor(
|
||||
new CreateFileProcessor("/de/hsadmin/mods/pac/httpd-virtual.jtpl", new HashMap<String, String>(), pacValuesList.iterator(), "/etc/apache2/virtual.conf.tmp", "root", "root", "644", true),
|
||||
new ShellProcessor("ls /etc/apache2/pems/" + pacName + ".pem >/dev/null 2>&1 " + "&& sed -i '/SSLCertificate.*default/d' " + "/etc/apache2/apache.conf.tmp"
|
||||
+ " && (ls /etc/apache2/pems/" + pacName + ".chain.pem >/dev/null 2>&1"
|
||||
+ " || sed -i '/SSLCertificateChain.*" + pacName + "/d' " + "/etc/apache2/virtual.conf.tmp)"
|
||||
+ " || sed -i '/SSLCertificate.*" + pacName + "/d' " + "/etc/apache2/virtual.conf.tmp"),
|
||||
new ShellProcessor("(diff -q /etc/apache2/apache.conf.tmp /etc/apache2/apache.conf"
|
||||
+ " && rm /etc/apache2/apache.conf.tmp)"
|
||||
+ " || invoke-rc.d apache2 reload >/dev/null 2>&1"));
|
||||
return domSetupProcessor;
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T extends AbstractEntity> Processor createUpdateProcessor(EntityManager em, T entity)
|
||||
throws ProcessorException {
|
||||
@ -68,7 +84,8 @@ public class PacProcessorFactory implements EntityProcessorFactory {
|
||||
createEtcHostsProc(hiveValues, pacValuesList),
|
||||
createNetworkInterfacesProc(hiveValues, pacValuesList),
|
||||
createSudouersProc(hiveValues, pacValuesList),
|
||||
createProftpdConfProc(hiveValues, pacValuesList)));
|
||||
createProftpdConfProc(hiveValues, pacValuesList),
|
||||
createHttpdVirtualProc(pac.getName(), pacValuesList)));
|
||||
waitingProcessor.appendProcessor(pac.getHiveName(), createDelUserProc(pac.getName()), "remove packet");
|
||||
return waitingProcessor;
|
||||
}
|
||||
|
@ -1,71 +0,0 @@
|
||||
<!-- BEGIN: main -->Das neue Hostsharing Paket {PAC} ist eingerichtet.
|
||||
Die Zugangsdaten sind:
|
||||
|
||||
Hostname (HTTP, FTP, SSH, POP3, IMAP): {PAC}.hostsharing.net
|
||||
Benutzernamen (Paket-Admin-Account): {PAC}
|
||||
Passwort: {PASSWORD}
|
||||
|
||||
Wir bitten zu beruecksichtigen, dass man mit diesem Passwort sehr viel
|
||||
Macht ueber das Paket hat. Bitte daher die u.g. Sicherheitshinweise
|
||||
beachten und den Paketadmin-Account {PAC} nicht mit unsicheren
|
||||
(unverschluesselten) Protokollen wie POP3 oder FTP ohne TLS verwenden!
|
||||
|
||||
E-Mail-Benachrichtigungen fuer den Paket-Admin gehen direkt an den
|
||||
o.g. Account. Ueber den E-Mail-Alias {PAC} koennen diese E-Mails
|
||||
an externe E-Mail-Adressen weitergeleitet werden. Initial ist
|
||||
eine Weiterleitung an {CUST_EMAIL} eingetragen.
|
||||
|
||||
Wir empfehlen, Domains nicht unter dem Paketadmin {PAC} sondern z.B.
|
||||
unter einem User "{PAC}-doms" anzulegen, um die Paket- und Domain-
|
||||
Verwaltung zu trennen. Dies gilt insbesondere, wenn die Domain-Inhalte
|
||||
per FTP gepflegt werden sollen.
|
||||
|
||||
Weitere Accounts (neben dem Paketadmin-Account {PAC}) koennen nach einem
|
||||
Login per SSH mit dem Kommandozeilen-Programm hsadmin eingerichtet
|
||||
oder mit dem Web-Client unter http://admin.hostsharing.net
|
||||
Dokumentation finden Sie unter:
|
||||
|
||||
<http://wiki.hostsharing.net/>
|
||||
|
||||
Der Webspace des Paketes ist theoretisch ab sofort unter
|
||||
<http://{PAC}.hostsharing.net/> erreichbar, allerdings kann es durch
|
||||
DNS-Caches Verzoegerungen geben. Das DocumentRoot ist
|
||||
~{PAC}/doms/{PAC}.hostsharing.net/htdocs/
|
||||
In SW Paketen darf diese Domain nur fuer administrative Zwecke verwendet
|
||||
werden.
|
||||
|
||||
Die vorgenannte Paket-Domain ist zum Testen und Ausprobieren gedacht.
|
||||
Das Verfahren zum Bestellen weiterer Domains ist auf unserer Website unter
|
||||
https://wiki.hostsharing.net/index.php?title=Domains
|
||||
beschrieben.
|
||||
|
||||
Bei evtl. auftretenden Problemen mit dem Server bitte zunaechst auf
|
||||
unserer Status-Website <http://status.hostsharing.net/> nachsehen,
|
||||
insbesondere auch auf der dortigen Seite "Aktionen", ob die Hostmaster
|
||||
bereits aktiv sind. Falls nicht, koennen die Hostmaster bei dringenden
|
||||
Problemen ueber die Rufnummer +49 40 209331331 erreicht werden.
|
||||
Bitte ggf. lange klingeln lassen, aber nicht mehr anrufen,
|
||||
wenn die Hostmaster laut Status-Seite "Aktionen" bereits dabei sind,
|
||||
das Problem zu beheben, da dies die Arbeiten dann nur verzoegern wuerde.
|
||||
Auch ist diese Rufnummer keine Support-Rufnummer, telefonische
|
||||
Support-Anfragen koennen grundsaetzlich nicht beantwortet werden.
|
||||
|
||||
Weitere Fragen beantworten wir gerne per E-Mail, am liebsten auf der
|
||||
passenden oeffentlichen Mailingliste (in den meisten Faellen wohl
|
||||
support@). Einen Ueberblick ueber unsere Mailinglisten bietet die Website:
|
||||
https://www.hostsharing.net/gemeinschaft
|
||||
|
||||
Viel Erfolg mit dem neuen Paket bei Hostsharing!
|
||||
|
||||
die Hostsharing Hostmaster
|
||||
|
||||
P.S. Diese E-Mail wurde automatisch erstellt und ist daher allgemein
|
||||
formuliert.
|
||||
|
||||
--
|
||||
Hostsharing Service | http://www.hostsharing.net
|
||||
Telefon: +49 40 209331311 | Fax: +49 40 209331312
|
||||
Hostsharing eG | Glockengiesserwall 17 | D-20095 Hamburg
|
||||
Registergericht Hamburg, GnR 1007 | USt.-ID-Nr.: DE218602793
|
||||
vertretungsberechtigter Vorstand: Michael Hierweck, Uwe Mueller
|
||||
<!-- END: main -->
|
@ -1,4 +1,9 @@
|
||||
<!-- BEGIN: main -->127.0.0.1 localhost
|
||||
<!-- BEGIN: main -->#
|
||||
# This file is managed by HSAdmin.
|
||||
# Do not edit manually. Changes will be overwritten.
|
||||
#
|
||||
|
||||
127.0.0.1 localhost
|
||||
|
||||
::1 ip6-localhost ip6-loopback
|
||||
fe00::0 ip6-localnet
|
||||
|
28
hsarback/src/de/hsadmin/mods/pac/httpd-virtual.jtpl
Normal file
28
hsarback/src/de/hsadmin/mods/pac/httpd-virtual.jtpl
Normal file
@ -0,0 +1,28 @@
|
||||
<!-- BEGIN: main -->#
|
||||
# This file is managed by HSAdmin.
|
||||
# Do not edit manually. Changes will be overwritten.
|
||||
#
|
||||
|
||||
<!-- BEGIN: iterate -->
|
||||
NameVirtualHost {PAC_IP}:80
|
||||
NameVirtualHost {PAC_IP}:443
|
||||
|
||||
<VirtualHost {PAC_IP}:80>
|
||||
|
||||
Redirect 404 /
|
||||
|
||||
</VirtualHost>
|
||||
|
||||
<VirtualHost {PAC_IP}:443>
|
||||
|
||||
SSLEngine On
|
||||
SSLCertificateFile /etc/apache2/pems/default.pem
|
||||
SSLCertificateChainFile /etc/apache2/pems/default.chain.pem
|
||||
SSLCertificateFile /etc/apache2/pems/{PAC}.pem
|
||||
SSLCertificateChainFile /etc/apache2/pems/{PAC}.chain.pem
|
||||
|
||||
Redirect 404 /
|
||||
|
||||
</VirtualHost>
|
||||
<!-- END: iterate -->
|
||||
<!-- END: main -->
|
@ -1,4 +1,9 @@
|
||||
<!-- BEGIN: main -->auto lo
|
||||
<!-- BEGIN: main -->#
|
||||
# This file is managed by HSAdmin.
|
||||
# Do not edit manually. Changes will be overwritten.
|
||||
#
|
||||
|
||||
auto lo
|
||||
iface lo inet loopback
|
||||
|
||||
auto eth0
|
||||
|
@ -1,4 +1,7 @@
|
||||
<!-- BEGIN: main --># This proftpd config file is generated by hsadmin.
|
||||
<!-- BEGIN: main -->#
|
||||
# This file is managed by HSAdmin.
|
||||
# Do not edit manually. Changes will be overwritten.
|
||||
#
|
||||
|
||||
Include /etc/proftpd/modules.conf
|
||||
|
||||
@ -56,8 +59,8 @@ PassivePorts 60000 65534
|
||||
</Directory>
|
||||
|
||||
<!-- BEGIN: iterate -->
|
||||
#----------------------------------------------------------------------
|
||||
# {PAC}.hostsharing.net
|
||||
####################################################
|
||||
|
||||
<VirtualHost {PAC_IP}>
|
||||
DefaultRoot ~ {PAC}
|
||||
ServerName "Hostsharing eG"
|
||||
|
@ -1,5 +1,7 @@
|
||||
<!-- BEGIN: main -->### Do not edit this file manually
|
||||
### Generated by HSAdmin Queue Server
|
||||
<!-- BEGIN: main -->#
|
||||
# This file is managed by HSAdmin.
|
||||
# Do not edit manually. Changes will be overwritten.
|
||||
#
|
||||
|
||||
# Host alias specification
|
||||
|
||||
@ -18,7 +20,7 @@ Defaults listpw=all # siehe sudoers(5)
|
||||
root ALL=(ALL) ALL
|
||||
%adm ALL=NOPASSWD: ALL
|
||||
|
||||
################################################################################
|
||||
####################################################
|
||||
|
||||
<!-- BEGIN: iterate -->{PAC} ALL = (%{PAC}) NOPASSWD: ALL
|
||||
<!-- END: iterate -->
|
||||
|
Loading…
Reference in New Issue
Block a user