tachtler:apache_http_server_centos_7_-_mod_jk_-_apache_tomcat_kommunikation
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Beide Seiten der vorigen RevisionVorhergehende ÜberarbeitungNächste Überarbeitung | Vorhergehende ÜberarbeitungLetzte ÜberarbeitungBeide Seiten der Revision | ||
tachtler:apache_http_server_centos_7_-_mod_jk_-_apache_tomcat_kommunikation [2015/05/12 13:43] – [Installation] klaus | tachtler:apache_http_server_centos_7_-_mod_jk_-_apache_tomcat_kommunikation [2015/10/19 06:00] – klaus | ||
---|---|---|---|
Zeile 25: | Zeile 25: | ||
===== Installation ===== | ===== Installation ===== | ||
- | Nachdem das **Drittanbieter-Repository** | + | Nachdem das **Drittanbieter-Repository** |
+ | * [[tachtler: | ||
+ | erfolgreich eingebunden wurde, kann mit nachfolgendem Befehl, das '' | ||
< | < | ||
# yum install httpd-mod_jk | # yum install httpd-mod_jk | ||
Zeile 100: | Zeile 102: | ||
/ | / | ||
</ | </ | ||
+ | |||
+ | ===== Konfiguration ===== | ||
+ | |||
+ | ==== / | ||
+ | |||
+ | Die Konfigurationsdatei ''/ | ||
+ | |||
+ | :!: **HINWEIS** - Hier werden aktuell **__KEINE__** Anpassungen vorgenommen, | ||
+ | |||
+ | (**komplette Konfigurationsdatei**) | ||
+ | <code apache> | ||
+ | # This file configures the mod_jk module: | ||
+ | LoadModule jk_module modules/ | ||
+ | </ | ||
+ | |||
+ | ==== / | ||
+ | |||
+ | Nachfolgende Konfigurationsdatei in nachfolgendem Verzeichnis mit nachfolgendem Namen | ||
+ | * ''/ | ||
+ | soll mit nachfolgendem Befehl **__neu__ angelegt werden** und die Konfiguration des Moduls '' | ||
+ | < | ||
+ | # touch / | ||
+ | </ | ||
+ | |||
+ | Anschließend sollte nachfolgender Inhalt in die Konfigurationsdatei - ''/ | ||
+ | <code apache> | ||
+ | < | ||
+ | # Apache httpd and Apache Tomcat Connector Configuration. | ||
+ | # JkRequestLogFormat: | ||
+ | # are shown. | ||
+ | # JkShmSize size can now be determined automatically | ||
+ | # JkShmSize 64k | ||
+ | JkShmFile "/ | ||
+ | |||
+ | JkLogFile "/ | ||
+ | JkLogLevel error | ||
+ | JkLogStampFormat "[%a, %d.%m.%Y %H:%M:%S] " | ||
+ | JkRequestLogFormat "%w %R %V %v %s %b %B %U %p %T %H %m" | ||
+ | |||
+ | JkWorkerProperty workers.tomcat_home="/ | ||
+ | JkWorkerProperty workers.java_home="/ | ||
+ | |||
+ | JkWorkerProperty worker.list=worker1, | ||
+ | JkWorkerProperty worker.jkstatus.type=status | ||
+ | |||
+ | JkWorkerProperty worker.worker1.type=ajp13 | ||
+ | JkWorkerProperty worker.worker1.host=127.0.0.1 | ||
+ | JkWorkerProperty worker.worker1.port=8099 | ||
+ | </ | ||
+ | </ | ||
+ | * //Dies ist nur eine Beispielkonfiguration.// | ||
+ | |||
+ | :!: **HINWEIS** - Die Bedeutung der einzelnen Befehle kann in der Dokumentation [[http:// | ||
+ | |||
+ | <code apache> | ||
+ | JkShmSize 64k | ||
+ | </ | ||
+ | :!: **nur erforderlich für balancer- und status.worker** - Zusätzlicher Cache-Speicher auf der Festplatte (Shared Memeory) | ||
+ | |||
+ | <code apache> | ||
+ | JkShmFile "/ | ||
+ | </ | ||
+ | :!: **nur erforderlich für balancer- und status.worker** - Datei für den zusätzlichen Cache-Speicher auf der Festplatte (Shared Memeory) | ||
+ | |||
+ | <code apache> | ||
+ | JkLogFile "/ | ||
+ | </ | ||
+ | Log-Datei des Modules mod_jk | ||
+ | |||
+ | <code apache> | ||
+ | JkLogLevel error | ||
+ | </ | ||
+ | Loglevel der Log-Datei des Modules mod_jk - //Standard ist info// | ||
+ | |||
+ | <code apache> | ||
+ | JkLogStampFormat "[%a, %d.%m.%Y %H:%M:%S] " | ||
+ | </ | ||
+ | Format des verwendeten Zeitstempels - siehe auch [[http:// | ||
+ | |||
+ | <code apache> | ||
+ | JkRequestLogFormat "%w %R %V %v %s %b %B %U %p %T %H %m" | ||
+ | </ | ||
+ | Format des Log-Eintrags - siehe auch [[http:// | ||
+ | |||
+ | <code apache> | ||
+ | JkWorkerProperty workers.tomcat_home="/ | ||
+ | </ | ||
+ | Heimatverzeichnis des [[http:// | ||
+ | |||
+ | <code apache> | ||
+ | JkWorkerProperty workers.java_home="/ | ||
+ | </ | ||
+ | Heimatverzeichnis der installierten Java-Version. | ||
+ | |||
+ | <code apache> | ||
+ | JkWorkerProperty worker.worker1.type=ajp13 | ||
+ | </ | ||
+ | Protokoll-Typ des AJP-Protokolls | ||
+ | |||
+ | <code apache> | ||
+ | JkWorkerProperty worker.worker1.host=127.0.0.1 | ||
+ | </ | ||
+ | IP-Adresse des [[http:// | ||
+ | |||
+ | <code apache> | ||
+ | JkWorkerProperty worker.worker1.port=8099 | ||
+ | </ | ||
+ | AJP-Port des [[http:// | ||
+ | |||
+ | ==== / | ||
+ | |||
+ | Falls kein // | ||
+ | |||
+ | Nachfolgend ein Beispiel für einen **// | ||
+ | <code apache> | ||
+ | # | ||
+ | # tomcat.tachtler.net (Apache Tomcat Applications) | ||
+ | # | ||
+ | < | ||
+ | ServerAdmin webmaster@tachtler.net | ||
+ | ServerName tomcat.tachtler.net | ||
+ | ServerAlias www.tomcat.tachtler.net | ||
+ | ServerPath / | ||
+ | |||
+ | DocumentRoot "/ | ||
+ | < | ||
+ | Options -Indexes +FollowSymLinks | ||
+ | # Tachtler (enable for .htaccess file support) | ||
+ | # AllowOverride AuthConfig | ||
+ | AllowOverride None | ||
+ | # Tachtler (enable for unlimited access) | ||
+ | Require all granted | ||
+ | </ | ||
+ | |||
+ | # Protect META-INF-Directory | ||
+ | < | ||
+ | AllowOverride None | ||
+ | Require all denied | ||
+ | </ | ||
+ | |||
+ | # Protect WEB-INF-Directory | ||
+ | < | ||
+ | AllowOverride None | ||
+ | Require all denied | ||
+ | </ | ||
+ | |||
+ | JkMount /*.action worker1 | ||
+ | JkMount /*.jsp worker1 | ||
+ | |||
+ | DirectoryIndex index.htm index.jsp | ||
+ | |||
+ | ErrorLog logs/ | ||
+ | SetEnvIf X-Forwarded-For " | ||
+ | CustomLog logs/ | ||
+ | CustomLog logs/ | ||
+ | </ | ||
+ | </ | ||
+ | * //Dies ist nur eine Beispielkonfiguration.// | ||
+ | |||
+ | Die Bedeutung der einzelnen Befehle kann in der Dokumentation [[http:// | ||
+ | |||
+ | <code apache> | ||
+ | JkMount /*.action worker1 | ||
+ | JkMount /*.jsp worker1 | ||
+ | </ | ||
+ | |||
+ | Die **erste Zeile**, weist den [[http:// | ||
+ | |||
+ | Die **zweite Zeile**, weist den [[http:// | ||
+ | |||
+ | ===== Beispiel ===== | ||
+ | |||
+ | Falls nun folgende einfache *.jsp-Datei mit dem Namen - '' | ||
+ | * ''/ | ||
+ | <code html> | ||
+ | <%@ page language=" | ||
+ | pageEncoding=" | ||
+ | < | ||
+ | |||
+ | < | ||
+ | <meta http-equiv=" | ||
+ | < | ||
+ | </ | ||
+ | < | ||
+ | <font style=" | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | und diese wie folgt wie hier z.B. aufgerufen wird | ||
+ | * http:// | ||
+ | sollte das aktuelle Datum und die aktuelle Uhrzeit, wie nachfolgend gezeigt, erscheinen: | ||
+ | |||
+ | {{: | ||
tachtler/apache_http_server_centos_7_-_mod_jk_-_apache_tomcat_kommunikation.txt · Zuletzt geändert: 2015/10/19 06:04 von klaus