Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision | ||
debian:proxy-server-debian:start [2017/04/06 20:04] – michael | debian:proxy-server-debian:start [2017/09/19 15:26] – [Zusätzliche Konfigurationen] michael | ||
---|---|---|---|
Line 4: | Line 4: | ||
**Was ist ein Reverse Proxy?** // | **Was ist ein Reverse Proxy?** // | ||
// | // | ||
+ | |||
<WRAP center round tip 70%> | <WRAP center round tip 70%> | ||
- | Eine ausführlichere Beschreibung hier: [[knowhow: | + | '' |
</ | </ | ||
- | **[[http:// | + | **[[http:// |
---- | ---- | ||
Line 21: | Line 22: | ||
</ | </ | ||
- | <WRAP center round box 100%> | + | <sxh bash; first-line: 1> |
- | < | + | |
# This file describes the network interfaces available on your system | # This file describes the network interfaces available on your system | ||
# and how to activate them. For more information, | # and how to activate them. For more information, | ||
Line 38: | Line 38: | ||
dns-nameservers 192.168.1.1 | dns-nameservers 192.168.1.1 | ||
- | </file> | + | </sxh> |
- | </WRAP> | + | |
Nach erfolgreicher Speicherung, | Nach erfolgreicher Speicherung, | ||
Line 49: | Line 48: | ||
===== Installation der Grundkomponenten ===== | ===== Installation der Grundkomponenten ===== | ||
- | Zu Beginn werden erst einmal alle Grundpakete, | + | Zu Beginn werden erst einmal alle Grundpakete, |
< | < | ||
+ | UBUNTU 14.04: | ||
# apt-get install apache2 libapache2-mod-proxy-html libxml2-dev | # apt-get install apache2 libapache2-mod-proxy-html libxml2-dev | ||
+ | |||
+ | UBUNTU 16.04: | ||
+ | # apt-get install apache2 libxml2-dev | ||
</ | </ | ||
Aktivierung der Proxy Komponenten aus dem Apache2 Paket. | Aktivierung der Proxy Komponenten aus dem Apache2 Paket. | ||
< | < | ||
- | # a2enmod proxy proxy_ajp proxy_http rewrite deflate headers proxy_balancer proxy_connect proxy_html xml2enc vhost_alias ssl | + | # a2enmod proxy proxy_ajp proxy_http |
</ | </ | ||
Line 92: | Line 95: | ||
<wrap em>// | <wrap em>// | ||
- | <file nsis blackgate.org.conf> | ||
+ | === blackgate.org.conf === | ||
+ | |||
+ | < | ||
+ | # vim / | ||
+ | </ | ||
+ | |||
+ | <sxh bash; first-line: 1> | ||
< | < | ||
# ServerName blackgate.org | # ServerName blackgate.org | ||
Line 99: | Line 108: | ||
# | # | ||
| | ||
- | | + | |
# | # | ||
</ | </ | ||
+ | </ | ||
- | </ | + | === proxy_http.conf === |
+ | < | ||
+ | # vim / | ||
+ | </ | ||
- | <file nsis proxy_http.conf> | + | <sxh bash; first-line: 1> |
# | # | ||
# | # | ||
Line 143: | Line 155: | ||
| | ||
- | | + | |
- | | + | |
| | ||
Line 196: | Line 207: | ||
</ | </ | ||
- | </file> | + | </sxh> |
- | <file nsis proxy_https_blackgate.conf> | + | === proxy_https_blackgate.conf === |
+ | |||
+ | <code> | ||
+ | # vim / | ||
+ | </ | ||
+ | |||
+ | <sxh bash; first-line: 1> | ||
< | < | ||
Line 619: | Line 636: | ||
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet | # vim: syntax=apache ts=4 sw=4 sts=4 sr noet | ||
- | </file> | + | </sxh> |
+ | |||
+ | |||
+ | |||
+ | === proxy_https_plexdash.conf === | ||
+ | |||
+ | < | ||
+ | # vim proxy_https_plexdash.conf | ||
+ | </code> | ||
- | <file nsis proxy_https_plexdash.conf> | + | <sxh bash; first-line: 1> |
# | # | ||
Line 735: | Line 760: | ||
</ | </ | ||
- | </file> | + | </sxh> |
+ | |||
+ | |||
+ | |||
+ | |||
+ | === letsencript_dummy.conf === | ||
+ | |||
+ | < | ||
+ | # vim / | ||
+ | </code> | ||
- | <file nsis letsencript_dummy.conf> | + | <sxh bash; first-line: 1> |
< | < | ||
Line 768: | Line 802: | ||
</ | </ | ||
- | </file> | + | </sxh> |
---- | ---- | ||
Line 779: | Line 813: | ||
< | < | ||
# a2ensite letsencript_dummy.conf | # a2ensite letsencript_dummy.conf | ||
+ | # service apache2 reload | ||
</ | </ | ||
</ | </ | ||
Line 791: | Line 826: | ||
< | < | ||
- | # ./ | + | # ./ |
</ | </ | ||
Line 798: | Line 834: | ||
==== Automatisiertes Key Update ==== | ==== Automatisiertes Key Update ==== | ||
- | Da das Letsencript Zertifikat nur eine Gültigkeit von drei Wochen hat, wird hier eine automatische Aktualisierung des Zertifikates empfohlen. Dies wird über einen neuen Crontab | + | Da das Letsencript Zertifikat nur eine Gültigkeit von drei Wochen hat, wird hier eine automatische Aktualisierung des Zertifikates empfohlen. Dies wird bei mir über einen crontab |
< | < | ||
Line 804: | Line 840: | ||
</ | </ | ||
- | <WRAP center round box 100%> | + | <sxh bash; first-line: 1> |
- | <code> | + | |
# / | # / | ||
# Unlike any other crontab you don't have to run the `crontab' | # Unlike any other crontab you don't have to run the `crontab' | ||
Line 820: | Line 855: | ||
47 6 * * 7 root test -x / | 47 6 * * 7 root test -x / | ||
52 6 1 * * root test -x / | 52 6 1 * * root test -x / | ||
+ | |||
0 12 * * 6 | 0 12 * * 6 | ||
# | # | ||
- | </code> | + | </sxh> |
- | </WRAP> | + | |
Line 843: | Line 878: | ||
< | < | ||
# service apache2 reload | # service apache2 reload | ||
+ | # rm / | ||
</ | </ | ||
Line 853: | Line 889: | ||
Alle hier gemachten Konfigurationsänderungen, | Alle hier gemachten Konfigurationsänderungen, | ||
+ | <WRAP center round box 100%> | ||
==== Härten des Apache-Proxys | ==== Härten des Apache-Proxys | ||
Zum härten des Apache2 Webservers werden wir nun die security.conf Konfigurationsdatei folgendermassen anpassen: | Zum härten des Apache2 Webservers werden wir nun die security.conf Konfigurationsdatei folgendermassen anpassen: | ||
Line 860: | Line 897: | ||
</ | </ | ||
- | <file nsis security.conf> | + | <sxh bash; first-line: 1> |
# ServerTokens | # ServerTokens | ||
ServerTokens Prod | ServerTokens Prod | ||
Line 875: | Line 912: | ||
Header set X-Frame-Options: | Header set X-Frame-Options: | ||
- | </file> | + | </sxh> |
< | < | ||
Line 881: | Line 918: | ||
</ | </ | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | <WRAP center round box 100%> | ||
==== Eigene ErrorPages definieren ==== | ==== Eigene ErrorPages definieren ==== | ||
- | Um eigene ErrorPages unter einem Apache Reverse Proxy einzubinden muss **folgendes snipped** in der Hauptkonfigurationsdatei von Apache2 //nach dem **letzten** </ | + | Um eigene ErrorPages unter einem Apache Reverse Proxy einzubinden muss **folgendes snipped** in der Hauptkonfigurationsdatei von Apache2 //nach dem letzten </ |
<file ini snippet> | <file ini snippet> | ||
Line 899: | Line 941: | ||
</ | </ | ||
- | Nach dem speichern, werden anschliessend die besagten ErrorDocs //(Gleiche Namensgebung wie oben; z.B: **BadRequest.html**)// **nach / | + | Nach dem speichern, werden anschliessend die besagten ErrorDocs //(Gleiche Namensgebung wie oben; z.B: BadRequest.html)// |
<WRAP center round download 60%> | <WRAP center round download 60%> | ||
Line 915: | Line 957: | ||
# service apache2 reload | # service apache2 reload | ||
</ | </ | ||
+ | </ | ||
+ | |||
---- | ---- | ||
+ | <WRAP center round box 100%> | ||
==== Zusätzliche Sub-Domains hinzufügen ==== | ==== Zusätzliche Sub-Domains hinzufügen ==== | ||
- | Sollen weitere | + | Sollen weitere |
- Anpassen der proxy-sites und neuer Sub-Domain Namen erfassen. < | - Anpassen der proxy-sites und neuer Sub-Domain Namen erfassen. < | ||
Line 925: | Line 970: | ||
# vim / | # vim / | ||
</ | </ | ||
- | - Zum letsencript Binary wechseln und den letzten certonly Befehl //(Suchen mit CTRL + R)// mit der am Schluss neu angehängter Domain z.B. "**-d NEU-DOM.DOMAIN.COM**" | + | - Zum letsencript Binary wechseln und den letzten certonly Befehl //(Suchen mit CTRL + R)// mit der am Schluss neu angehängter Domain z.B. "**-d NEU-SUBDOM.DOMAIN.COM**" |
# cd / | # cd / | ||
# ./ | # ./ | ||
Line 933: | Line 978: | ||
</ | </ | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | <WRAP center round box 100%> | ||
+ | ==== Setzen der korrekten Timezone | ||
+ | - Die aktuelle Konfiguration kann mit **'' | ||
+ | # timedatectl | ||
+ | </ | ||
+ | Local time: Sun 2017-04-23 07:56:23 UTC | ||
+ | Universal time: Sun 2017-04-23 07:56:23 UTC | ||
+ | RTC time: Sun 2017-04-23 07:56:25 | ||
+ | Time zone: Etc/UTC (UTC, +0000) | ||
+ | | ||
+ | NTP synchronized: | ||
+ | RTC in local TZ: no | ||
+ | </ | ||
+ | - Auflisten aller verfügbaren Timezones.. < | ||
+ | # timedatectl list-timezones | ||
+ | </ | ||
+ | Africa/ | ||
+ | Africa/ | ||
+ | Africa/ | ||
+ | Africa/ | ||
+ | Africa/ | ||
+ | Africa/ | ||
+ | Africa/ | ||
+ | Africa/ | ||
+ | ... | ||
+ | </ | ||
+ | - **Setzen der neuen,** <wrap em> | ||
+ | # timedatectl set-timezone Europe/ | ||
+ | </ | ||
+ | Local time: Sun 2017-04-23 09:57:37 CEST | ||
+ | Universal time: Sun 2017-04-23 07:57:37 UTC | ||
+ | RTC time: Sun 2017-04-23 07:57:39 | ||
+ | Time zone: Europe/ | ||
+ | | ||
+ | NTP synchronized: | ||
+ | RTC in local TZ: no | ||
+ | </ | ||
+ | |||
+ | </ | ||
+ | |||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== WakeOnLAN über Proxy automatisieren ==== | ||
+ | |||
+ | < | ||
+ | # apt-get update | ||
+ | # apt-get install etherwake | ||
+ | </ | ||
+ | |||
+ | Anschliessend, | ||
+ | |||
+ | < | ||
+ | # vim / | ||
+ | </ | ||
+ | |||
+ | <sxh bash; first-line: 1> | ||
+ | # / | ||
+ | # Unlike any other crontab you don't have to run the `crontab' | ||
+ | # command to install the new version when you edit this file | ||
+ | # and files in / | ||
+ | # that none of the other crontabs do. | ||
+ | |||
+ | SHELL=/ | ||
+ | PATH=/ | ||
+ | |||
+ | # m h dom mon dow user command | ||
+ | 17 * * * * | ||
+ | 25 6 * * * | ||
+ | 47 6 * * 7 | ||
+ | 52 6 1 * * | ||
+ | # | ||
+ | 0 12 * * 6 | ||
+ | |||
+ | 0 7 * * 1-5 | ||
+ | 0 9 * * 6-7 | ||
+ | |||
+ | #0 3 * * * | ||
+ | # | ||
+ | </ |