Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Beide Seiten der vorigen Revision Vorhergehende Überarbeitung Nächste Überarbeitung | Vorhergehende Überarbeitung Nächste ÜberarbeitungBeide Seiten der Revision | ||
centos:mail_c7:horde_1 [19.09.2014 07:27. ] – [PHP Einstellungen] django | centos:mail_c7:horde_1 [20.09.2014 21:29. ] – [weitere Schritte zur Einrichtung] django | ||
---|---|---|---|
Zeile 2812: | Zeile 2812: | ||
# systemctl reload httpd.service | # systemctl reload httpd.service | ||
- | ===== Applikationen | + | ===== Apache vHost ===== |
+ | ==== vHost Definition ==== | ||
+ | Für unsere WEB-Applikation richten wir uns nun einen geeigneten **[[centos: | ||
+ | Im Konfigurationsverzeichnis unseres [[centos: | ||
+ | # vim / | ||
- | | + | <file apache / |
- | * **horde | + | # horde.sec-mail.guru (Horde Groupware Version 5) |
- | * [[centos:mail_c6: | + | # |
- | * [[centos:mail_c6:horde_4|Aufgaben | + | < |
- | * [[centos:mail_c6:horde_5|Adressbuch | + | ServerAdmin webmaster@nausch.org |
- | * [[centos:mail_c6: | + | ServerName horde.sec-mail.guru |
- | * [[centos:mail_c6: | + | ServerAlias xn--bro-hoa.sec-mail.guru |
- | * [[centos:mail_c6: | + | ServerPath / |
- | | + | |
+ | < | ||
+ | Options -Indexes +FollowSymLinks | ||
+ | Require all granted | ||
+ | </ | ||
+ | |||
+ | RewriteEngine on | ||
+ | RewriteCond %{HTTPS} off | ||
+ | RewriteRule (.*) https:// | ||
+ | |||
+ | DirectoryIndex index.php | ||
+ | |||
+ | ErrorLog logs/ | ||
+ | CustomLog logs/ | ||
+ | </ | ||
+ | < | ||
+ | ServerAdmin webmaster@nausch.org | ||
+ | ServerName | ||
+ | ServerAlias xn--bro-hoa.sec-mail.guru | ||
+ | ServerPath / | ||
+ | DocumentRoot "/ | ||
+ | |||
+ | < | ||
+ | SSLEngine on | ||
+ | SSLProtocol -ALL +SSLv3 +TLSv1 | ||
+ | SSLCipherSuite EECDH+AES256: | ||
+ | SSLHonorCipherOrder on | ||
+ | SSLCertificateFile / | ||
+ | SSLCertificateKeyFile / | ||
+ | SSLCertificateChainFile / | ||
+ | |||
+ | </ | ||
+ | |||
+ | < | ||
+ | GnuTLSEnable on | ||
+ | GnuTLSPriorities SECURE: | ||
+ | # # | ||
+ | GnuTLSCertificateFile / | ||
+ | GnuTLSKeyFile / | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/ | ||
+ | AddOutputFilterByType DEFLATE application/ | ||
+ | < | ||
+ | < | ||
+ | SetOutputFilter DEFLATE | ||
+ | BrowserMatch ^Mozilla/4 gzip-only-text/ | ||
+ | BrowserMatch ^Mozilla/ | ||
+ | | ||
+ | SetEnvIfNoCase Request_URI \.(?: | ||
+ | </ | ||
+ | < | ||
+ | Header append Vary User-Agent env=!dont-vary | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | |||
+ | AddType application/ | ||
+ | |||
+ | # Link to system Javascript Libraries | ||
+ | Alias / | ||
+ | Alias / | ||
+ | Alias / | ||
+ | |||
+ | # Link to Micro$oft stuff | ||
+ | Alias / | ||
+ | Alias / | ||
+ | |||
+ | < | ||
+ | # **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. | ||
+ | < | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | Require all granted | ||
+ | </ | ||
+ | |||
+ | # Django : 2014-09-19 | ||
+ | # aus der Konfigurationsdatei php-horde-kronolith.conf übernommen | ||
+ | < | ||
+ | RewriteEngine On | ||
+ | RewriteBase | ||
+ | RewriteCond | ||
+ | RewriteCond | ||
+ | RewriteRule ^(.*)$ rampage.php | ||
+ | </ | ||
+ | |||
+ | 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$ | ||
+ | RewriteRule ^$ https://horde.sec-mail.guru [L,R=301] | ||
+ | |||
+ | # Exclude file from password protection | ||
+ | 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_X_MS_POLICYKEY:%{HTTP:X-Ms-Policykey}] | ||
+ | RewriteRule .* - [E=HTTP_AUTHORIZATION: | ||
+ | </ | ||
+ | |||
+ | # Deny access to the test.php files except from localhost | ||
+ | <Files " | ||
+ | # Django : 2014-09-19 | ||
+ | # Zugriff generell verbieten | ||
+ | # Require all denied | ||
+ | # Zugriff nur vom Host vml000010.dmz.nausch.org aus erlauben | ||
+ | Require host vml000010.dmz.nausch.org | ||
+ | </ | ||
+ | |||
+ | # Those directories should not be viewed by Web clients. | ||
+ | < | ||
+ | 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 | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | # Django | ||
+ | # aus der Konfigurationsdatei php-horde-kronolith.conf übernommen | ||
+ | < | ||
+ | < | ||
+ | RewriteEngine On | ||
+ | RewriteCond | ||
+ | RewriteCond | ||
+ | RewriteRule | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | DirectoryIndex index.php | ||
+ | ErrorLog logs/ | ||
+ | CustomLog logs/ | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | <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> | ||
+ | < | ||
+ | # Access-stuff (Zugriff von überall erlauben.) | ||
+ | #Require all granted | ||
+ | # Access-stuff (Zugriff nur vom Admin-Netz aus!) | ||
+ | Require host nausch.org | ||
+ | </ | ||
+ | ... | ||
+ | </ | ||
+ | Nach erfolgter Konfiguration, | ||
+ | <code apache> | ||
+ | < | ||
+ | # Access-stuff (Zugriff von überall erlauben.) | ||
+ | Require all granted | ||
+ | # Access-stuff (Zugriff nur vom Admin-Netz aus!) | ||
+ | #Require host nausch.org | ||
+ | </ | ||
+ | ... | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | ==== 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 | ||
+ | |||
+ | | ||
+ | |||
+ | Abschließend führen wir einen Reload sdes Daemon durch. | ||
+ | # systemctl reload httpd.service | ||
+ | |||
+ | Bei Bedarf können wir auch den Status des Apche Webservers abfragen. | ||
+ | # systemctl status httpd.service | ||
+ | |||
+ | < | ||
+ | | ||
+ | | ||
+ | Process: 20019 ExecStop=/ | ||
+ | Process: 22718 ExecReload=/ | ||
+ | Main PID: 20024 (httpd) | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | Sep 10 19:45:20 vml000097.dmz.nausch.org systemd[1]: Reloading The Apache HTTP Server. | ||
+ | Sep 10 19:45:21 vml000097.dmz.nausch.org systemd[1]: Reloaded The Apache HTTP Server. | ||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | ===== mySQL Datenbank ===== | ||
+ | Ein Großteil der Benutzer-Konfigurationsdaten werden in einer **[[centos:mysql|mySQL-Datenbank]]** /* FIXME */ gespeichert und vorgehalten. | ||
+ | |||
+ | ==== Datenbank anlegen ==== | ||
+ | Diese **[[centos:mysql|mySQL-Datenbank]]** /* FIXME */ und der zugehörige Datenbankuser werden wird nun im ersten Schritt anlegen. | ||
+ | |||
+ | Wir melden uns also als berechtigter Datenbankuser an der mySQL-Datenbank an. | ||
+ | | ||
+ | |||
+ | < | ||
+ | Welcome to the MySQL monitor. | ||
+ | Your MySQL connection id is 217075 | ||
+ | Server version: 5.1.73 Source distribution | ||
+ | |||
+ | Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. | ||
+ | |||
+ | Oracle is a registered trademark of Oracle Corporation and/or its | ||
+ | affiliates. Other names may be trademarks of their respective | ||
+ | owners. | ||
+ | |||
+ | Type ' | ||
+ | |||
+ | mysql> | ||
+ | </ | ||
+ | Dort legen wir als aller erst einmal eine Datenbank mit dem Namen **horde** an. | ||
+ | | ||
+ | |||
+ | Query OK, 1 row affected (0.00 sec) | ||
+ | |||
+ | ==== Datenbankuser anlegen ==== | ||
+ | Anschließend legen wir uns einen Datenbankuser an, denen wir entsprechende Rechte an der, gerade angelegten Datenbank **horde** einräumen. Als Namen nehme wir einfach **hode_admin_user**. | ||
+ | |||
+ | | ||
+ | |||
+ | Query OK, 0 rows affected (0.00 sec) | ||
+ | |||
+ | und | ||
+ | | ||
+ | |||
+ | Query OK, 0 rows affected (0.00 sec) | ||
+ | |||
+ | ==== Nutzerberechtigungen setzen ==== | ||
+ | Dem gerade angelebtem Datenbankuser für **[[http://horde.org|Horde]]** gewähren wir nun die nötigen Rechte, damit dieser vom Webserver aus, Tabellen anlegen, befüllen und verändern darf. | ||
+ | | ||
+ | |||
+ | |||
+ | Query OK, 0 rows affected (0.00 sec) | ||
+ | |||
+ | und | ||
+ | | ||
+ | |||
+ | Query OK, 0 rows affected (0.00 sec) | ||
+ | |||
+ | ==== Nutzerberechtigungen zuweisen ==== | ||
+ | Zum Ende unserer mySQL-Userkonfiguration weisen wir unserem Nutzer die Berechtigungen zu. | ||
+ | | ||
+ | |||
+ | Query OK, 0 rows affected | ||
+ | |||
+ | Wir können uns nun vom Datenbank-Server wieder abmelden. | ||
+ | | ||
+ | |||
+ | Bye | ||
+ | |||
+ | ==== Zugriff testen ==== | ||
+ | Als nächstes überprüfen wir, ob der zuvor angelegt User/Zugang vom WEB-Server aus auch funktioniert. | ||
+ | # mysql -D horde5 -h mysql.dmz.nausch.org -u horde_admin_user -p | ||
+ | < | ||
+ | Welcome to the MariaDB monitor. | ||
+ | Your MySQL connection id is 217265 | ||
+ | Server version: 5.1.73 Source distribution | ||
+ | |||
+ | Copyright (c) 2000, 2014, Oracle, Monty Program Ab and others. | ||
+ | |||
+ | Type ' | ||
+ | |||
+ | MySQL [horde5]> | ||
+ | </ | ||
+ | Die Verbindung klappt schon mal, daher lassen wir uns mal ansehen, welche Datenbanken der administrative Horde-User sehen kann. | ||
+ | |||
+ | |||
+ | MySQL [horde5]> show databases; | ||
+ | < | ||
+ | | Database | ||
+ | +--------------------+ | ||
+ | | information_schema | | ||
+ | | horde5 | ||
+ | +--------------------+ | ||
+ | 2 rows in set (0.01 sec) | ||
+ | |||
+ | MySQL [horde5]> | ||
+ | </ | ||
+ | Auch dieser Test fiel positiv aus, wir können uns daher die Verbindung zum Datenbank-Server beenden und uns der weiteren konfiguration widmen. | ||
+ | MySQL [horde5]> | ||
+ | |||
+ | Bye | ||
+ | |||
+ | ===== weitere Schritte zur Einrichtung ===== | ||
+ | Nach der erfolgreichen Einrichtung des [[Webservers]] und der [[centos:mail_c7:horde_1?&# |