Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Beide Seiten der vorigen Revision Vorhergehende Überarbeitung Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
| centos:mail_c7:php7:horde_2 [10.10.2017 10:39. ] – [Nutzerberechtigungen zuweisen] django | centos:mail_c7:php7:horde_2 [18.11.2024 19:10. ] (aktuell) – Externe Bearbeitung 127.0.0.1 | ||
|---|---|---|---|
| Zeile 99: | Zeile 99: | ||
| ===== Apache vHost ===== | ===== Apache vHost ===== | ||
| - | ==== vHost Definition | + | ==== Konfiguration |
| - | Für unsere Webapplikation richten wir uns nun einen geeigneten vHost ein. Da wir später S/MIME und PGP nutzen wollen, | + | Für unsere Webapplikation richten wir uns nun einen geeigneten vHost ein. Für die Benutzeranmeldung |
| # vim / | # vim / | ||
| + | |||
| + | <file apache / | ||
| + | # Django : 2017-10-10 | ||
| + | # vHost horde | ||
| + | # | ||
| + | |||
| + | # Variablen der Hostvariablen | ||
| + | Define vhost horde | ||
| + | Define errors_log logs/ | ||
| + | Define access_log logs/ | ||
| + | Define ssl_log logs/ | ||
| + | |||
| + | < | ||
| + | ServerAdmin webmaster@nausch.org | ||
| + | ServerName | ||
| + | ServerPath | ||
| + | |||
| + | RewriteEngine on | ||
| + | RewriteCond %{HTTPS} off | ||
| + | RewriteRule (.*) https:// | ||
| + | |||
| + | # Welche Logdateien sollen beschrieben werden | ||
| + | SetEnvIf Remote_Addr " | ||
| + | ErrorLog | ||
| + | CustomLog ${access_log} combined env=!dontlog | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | ServerAdmin webmaster@nausch.org | ||
| + | ServerName | ||
| + | ServerPath / | ||
| + | |||
| + | # Welcher Inhalt soll angezeigt bzw. auf welchen Server sollen die HTTP-Requests weitergeleitet werden? | ||
| + | DocumentRoot "/ | ||
| + | DirectoryIndex index.php | ||
| + | |||
| + | AddType application/ | ||
| + | |||
| + | < | ||
| + | # PHP-FPM UID/GID apache: | ||
| + | SetHandler " | ||
| + | #SetHandler " | ||
| + | </ | ||
| + | |||
| + | # Links zu den System-Bibliotheken | ||
| + | Alias / | ||
| + | Alias / | ||
| + | Alias / | ||
| + | |||
| + | # Links für die Micro$oft Spezialsachen | ||
| + | Alias / | ||
| + | Alias / | ||
| + | |||
| + | # Wer soll Zugriff auf die Webseite(n) bekommen? | ||
| + | < | ||
| + | # **IMPORTANT** By default, everyone accessing Horde is automatically logged | ||
| + | # in as ' | ||
| + | # you change the authentication backend under the ' | ||
| + | # For this reason, Horde is currently only accessible from localhost. | ||
| + | < | ||
| + | # Zugriff nur vom Host vml000010.dmz.nausch.org aus erlauben | ||
| + | Require host vml000017.dmz.nausch.org | ||
| + | # Zugriff generell erlauben | ||
| + | # Require all granted | ||
| + | </ | ||
| + | |||
| + | # Django : 2017-10-10 | ||
| + | # aus der Konfigurationsdatei php-horde-kronolith.conf übernommen | ||
| + | < | ||
| + | RewriteEngine On | ||
| + | RewriteBase | ||
| + | RewriteCond | ||
| + | RewriteCond | ||
| + | RewriteRule ^(.*)$ rampage.php [QSA,L] | ||
| + | </ | ||
| + | |||
| + | Options +FollowSymLinks | ||
| + | #Options All | ||
| + | # | ||
| + | |||
| + | # Rewrite the requestet URI, when it is with german " | ||
| + | RewriteEngine On | ||
| + | RewriteCond %{REQUEST_URI} ^/$ | ||
| + | RewriteCond %{HTTP_HOST} ^xn--bro-hoa.sec-mail.guru$ [NC] | ||
| + | RewriteRule ^$ https:// | ||
| + | |||
| + | # Zugriff auch ohne Passwort Abfrage ermöglichen | ||
| + | SetEnvIf Request_URI " | ||
| + | SetEnvIf Request_URI " | ||
| + | SetEnvIf Request_URI " | ||
| + | SetEnvIf Request_URI " | ||
| + | SetEnvIf Request_URI " | ||
| + | SetEnvIf Request_URI " | ||
| + | |||
| + | # ActiveSync | ||
| + | RewriteEngine On | ||
| + | RewriteRule ^/ | ||
| + | RewriteRule .* - [E=HTTP_MS_ASPROTOCOLVERSION: | ||
| + | RewriteRule .* - [E=HTTP_X_MS_POLICYKEY: | ||
| + | RewriteRule .* - [E=HTTP_AUTHORIZATION: | ||
| + | </ | ||
| + | |||
| + | # Zugriff auf die Seite test.php beschränken, | ||
| + | <Files " | ||
| + | # Django : 2017-10-10 | ||
| + | # Zugriff generell verbieten | ||
| + | # Require all denied | ||
| + | # Zugriff nur vom Host vml000010.dmz.nausch.org aus erlauben | ||
| + | Require host vml000010.dmz.nausch.org | ||
| + | </ | ||
| + | |||
| + | # Zugriffe von (Web)Clients dirt auf nachfolgende Verzeichnisse und Seiten unterbinden. | ||
| + | < | ||
| + | Require all denied | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | Require all denied | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | < | ||
| + | RewriteEngine On | ||
| + | RewriteCond | ||
| + | RewriteCond | ||
| + | RewriteRule | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | # Django : 2014-09-19 | ||
| + | # aus der Konfigurationsdatei php-horde-content.conf übernommen | ||
| + | < | ||
| + | < | ||
| + | RewriteEngine On | ||
| + | RewriteCond | ||
| + | RewriteCond | ||
| + | RewriteRule ^(.*)$ index.php [QSA,L] | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | # Django : 2014-09-19 | ||
| + | # aus der Konfigurationsdatei php-horde-kronolith.conf übernommen | ||
| + | < | ||
| + | < | ||
| + | RewriteEngine On | ||
| + | RewriteCond | ||
| + | RewriteCond | ||
| + | RewriteRule | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/ | ||
| + | AddOutputFilterByType DEFLATE application/ | ||
| + | < | ||
| + | < | ||
| + | SetOutputFilter DEFLATE | ||
| + | BrowserMatch ^Mozilla/4 gzip-only-text/ | ||
| + | BrowserMatch ^Mozilla/ | ||
| + | BrowserMatch \bMSIE !no-gzip !gzip-only-text/ | ||
| + | SetEnvIfNoCase Request_URI \.(?: | ||
| + | </ | ||
| + | < | ||
| + | Header append Vary User-Agent env=!dont-vary | ||
| + | </ | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | # Welche Logdateien sollen beschrieben werden | ||
| + | SetEnvIf Remote_Addr " | ||
| + | ErrorLog | ||
| + | CustomLog ${access_log} combined env=!dontlog | ||
| + | CustomLog ${ssl_log} "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \" | ||
| + | |||
| + | # Absicherung der Übertragung mit Hilfe von TLS | ||
| + | # Django : 2015-10-04 - TLS-Verschlüsselung mit Hilfe von mod_ssl | ||
| + | SSLEngine on | ||
| + | # Definition der anzubietenden Protokolle | ||
| + | SSLProtocol All All -SSLv2 -SSLv3 -TLSv1 -TLSv1.1 | ||
| + | # Definition der Cipher | ||
| + | SSLCipherSuite ECDHE-RSA-AES256-GCM-SHA384: | ||
| + | # Schlüsseldatei, | ||
| + | SSLCertificateKeyFile / | ||
| + | # Zertifikatsdatei, | ||
| + | SSLCertificateFile / | ||
| + | # Zertifikatsdatei des bzw. der Intermediate-Zertifikate(s) | ||
| + | SSLCertificateChainFile / | ||
| + | # Änderung der Cipherorder der Clienets verneinen | ||
| + | SSLHonorCipherOrder on | ||
| + | # TLS 1.0 Kompremmierung deaktivieren (CRIME attacks) | ||
| + | SSLCompression off | ||
| + | # Online Certificate Status Protocol stapling zum Prüfen des Gültigkeitsstatus des Serverzertifikats. | ||
| + | SSLUseStapling on | ||
| + | SSLStaplingResponderTimeout 5 | ||
| + | SSLStaplingReturnResponderErrors off | ||
| + | | ||
| + | # special stuff ### | ||
| + | |||
| + | # HTTP Strict Transport Security (HSTS), bei dem der Server dem Client im HTTP-Header mitteilt, | ||
| + | # dass dieser nur noch verschlüsselt mit dem Server kommunizieren soll. | ||
| + | Header always set Strict-Transport-Security " | ||
| + | |||
| + | # This header enables the Cross-site scripting (XSS) filter built into most recent web browsers. | ||
| + | # It's usually enabled by default anyway, so the role of this header is to re-enable the filter for | ||
| + | # this particular website if it was disabled by the user. | ||
| + | # https:// | ||
| + | Header set X-XSS-Protection "1; mode=block" | ||
| + | |||
| + | # when serving user-supplied content, include a X-Content-Type-Options: | ||
| + | # to disable content-type sniffing on some browsers. | ||
| + | # https:// | ||
| + | # currently suppoorted in IE > 8 http:// | ||
| + | # http:// | ||
| + | # ' | ||
| + | Header set X-Content-Type-Options nosniff | ||
| + | |||
| + | # config to don't allow the browser to render the page inside an frame or iframe | ||
| + | # and avoid clickjacking http:// | ||
| + | # if you need to allow [i]frames, you can use SAMEORIGIN or even set an uri with ALLOW-FROM uri | ||
| + | # https:// | ||
| + | header set X-Frame-Options SAMEORIGIN | ||
| + | |||
| + | </ | ||
| + | </ | ||
| + | |||
| + | <WRAP round important> | ||
| + | |||
| + | Solange wir unseren vHost noch nicht in der Produktionsumgebung steht und fertig konfiguriert wurde, beschränken wir den Zugriff auf den vHost noch. Hierzu tragen wir in der **Directive // | ||
| + | <code apache> | ||
| + | # Zugriff nur vom Host vml000010.dmz.nausch.org aus erlauben | ||
| + | Require host vml000017.dmz.nausch.org | ||
| + | # Zugriff generell erlauben | ||
| + | # Require all granted | ||
| + | ... | ||
| + | </ | ||
| + | |||
| + | Nach erfolgter Konfiguration, | ||
| + | <code apache> | ||
| + | # Zugriff nur vom Host vml000010.dmz.nausch.org aus erlauben | ||
| + | # Require host vml000017.dmz.nausch.org | ||
| + | # Zugriff generell erlauben | ||
| + | Require all granted | ||
| + | ... | ||
| + | </ | ||
| + | |||
| + | </ | ||
| + | |||
| + | ==== Konfiguration aktivieren ==== | ||
| + | Bevor unseren Webserver starten, damit der neue vHost auch bedient werden kann, überprüfen wir die Konfiguration noch auf syntaktische Fehler. | ||
| + | # apachectl -t | ||
| + | |||
| + | | ||
| + | |||
| + | Abschliessend starten wir den Webserver einmal durch. | ||
| + | # systemctl restart httpd.service | ||
| + | |||
| + | |||
| FIXME //**... do geht's weida!**// FIXME | FIXME //**... do geht's weida!**// FIXME | ||
| + | |||