neuen V-Host erstellen
- DNS einrichten: den DNS-Namen für den neuen Host auf die IP-Adresse (oder als CNAME auf den Hostnamen) des Apache-Servers (
laubfrosch.p21.net,172.16.0.2) zeigen lassen - auf Laubfrosch anmelden,
rootwerden - im Verzeichnis
/var/www- für eine Web-Service:
ein neues Verzeichnis mit dem Hostnamen anlegen:mkdir twiki.mtronig.de - für einen Nicht-Web-Server (z.B. IMAP, murmur, ...):
einen Sym-Link auflocalhostanlegen:mkdir ln -s localhost murmur.vpn21.net
- für eine Web-Service:
- SSL Verzeichnis erstellen
- mit eigenem SSL-Cert oder als zentrale Stelle für ein Sammel-Cert:
ein Unterverzeichnissslanlegen:mkdir -p twiki.mtronig.de/ssl - zu einem Sammel-Cert hinzufügen:
einen Symlink auf dassslVerzeichnis des Sammel-Cert-Halters legen:ln -s ../usvn/ssl twiki.mtronig.de/ssl - für einen Nicht-Web-Server (z.B. IMAP, murmur, ...) ist das im
localhostgeregelt.
sslVerzeichnis (Link oder physisch) werden folgende Dateien für die nachfolgende Konfigruation benötigt und müssen durch getssl.sh erstellt werden:ca-bundle.pemserver.crtserver.key_decrypted
- mit eigenem SSL-Cert oder als zentrale Stelle für ein Sammel-Cert:
- im Host-Verzeichnis die Web-Daten unterbringen, für einen Forwarder auf einen anderen Web-Service via
httpoderhttpskommen keine Daten hier hinein.
Die Web-Daten hier sollten demapacheUser gehören:chown -R apache:apache twiki.mtronig.de.
Eine einfache Datei für den Start oder für Wartungsarbeiten liegt als Anhang dieser Wiki-Seite bei. - im Konfigurations-Verzeichnis
/etc/apache2/vhosts.deine neue Host-Konfiguration erstellen nach dem Namensmusternn-hostname.mit.domaine.tld.conf. Jeder V-Host bekommt eine eigene Nummer, die vor99und auch vor78einsortiert wird, normalerweise aufsteigend ab21die nächste freie Nummer. Die Konfigurationsdatei richtet sich nach den Eigenschaften des Web-Service, soll aber auf jeden Fall die Teile der SSL-Konfiguration enthalten:### Section 3: Virtual Hosts # # VirtualHost: If you want to maintain multiple domains/hostnames on your # machine you can setup VirtualHost containers for them. Most configurations # use only name-based virtual hosts so the server doesn't need to worry about # IP addresses. This is indicated by the asterisks in the directives below. # # Please see the documentation at # <URL:http://httpd.apache.org/docs-2.0/vhosts/> # for further details before you try to setup virtual hosts. # # You may use the command line option '-S' to verify your virtual host # configuration. # # Use name-based virtual hosting. # #NameVirtualHost *:80 # # Almost any Apache directive may go into a VirtualHost container. # The first VirtualHost section is used for requests without a known # server name. # <VirtualHost *:80> ServerName wrp.vpn21.net RedirectMatch permanent "^(/(?!.well-known/acme-challenge?).*)" https://wrp.vpn21.net$1 </VirtualHost> <VirtualHost *:443> ServerName wrp.vpn21.net # SSLProxyEngine On # RequestHeader set Front-End-Https "On" RequestHeader edit Destination https://wrp.vpn21.net/ http://172.18.2.3:8080/ ProxyRequests Off ProxyPass /.well-known ! ProxyPass / http://172.18.2.3:8080/ ProxyPassReverse / http://172.18.2.3:8080/ SSLEngine on ## Server Certificate: # Point SSLCertificateFile at a PEM encoded certificate. If the certificate # is encrypted, then you will be prompted for a pass phrase. Note that a # kill -HUP will prompt again. Keep in mind that if you have both an RSA # and a DSA certificate you can configure both in parallel (to also allow # the use of DSA ciphers, etc.) SSLCertificateFile /var/www/wrp.vpn21.net/ssl/server.crt ## Server Private Key: # If the key is not combined with the certificate, use this directive to # point at the key file. Keep in mind that if you've both a RSA and a DSA # private key you can configure both in parallel (to also allow the use of # DSA ciphers, etc.) SSLCertificateKeyFile /var/www/wrp.vpn21.net/ssl/server.key_decrypted ## Server Certificate Chain: # Point SSLCertificateChainFile at a file containing the concatenation of # PEM encoded CA certificates which form the certificate chain for the # server certificate. Alternatively the referenced file can be the same as # SSLCertificateFile when the CA certificates are directly appended to the # server certificate for convinience. SSLCertificateChainFile /var/www/wrp.vpn21.net/ssl/ca-bundle.pem Header always add Strict-Transport-Security "max-age=15768000" </VirtualHost> - weiter mit der Einrichtung von
getssl
Last modified 5 years ago
Last modified on Aug 1, 2020, 5:10:52 PM
Attachments (1)
-
maintenance.html (877 bytes) - added by 5 years ago.
eine einfache "Sorry"-Seite für den Webseiten-Start und für Wartungssarbeiten
Download all attachments as: .zip
