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:33] – [Herunterladen] klaus | tachtler:apache_http_server_centos_7_-_mod_jk_-_apache_tomcat_kommunikation [2015/10/19 06:00] – klaus | ||
---|---|---|---|
Zeile 20: | Zeile 20: | ||
===== Herunterladen ===== | ===== Herunterladen ===== | ||
- | Nachfolgend soll ein Drittanbieter-Repository | + | Nachfolgend soll ein **Drittanbieter-Repository**, welches |
* [[tachtler: | * [[tachtler: | ||
===== Installation ===== | ===== Installation ===== | ||
+ | |||
+ | Nachdem das **Drittanbieter-Repository** | ||
+ | * [[tachtler: | ||
+ | erfolgreich eingebunden wurde, kann mit nachfolgendem Befehl, das '' | ||
+ | < | ||
+ | # yum install httpd-mod_jk | ||
+ | Loaded plugins: changelog, priorities | ||
+ | 122 packages excluded due to repository priority protections | ||
+ | Resolving Dependencies | ||
+ | --> Running transaction check | ||
+ | ---> Package httpd-mod_jk.x86_64 0: | ||
+ | --> Finished Dependency Resolution | ||
+ | |||
+ | Changes in packages about to be updated: | ||
+ | |||
+ | |||
+ | Dependencies Resolved | ||
+ | |||
+ | ================================================================================ | ||
+ | | ||
+ | ================================================================================ | ||
+ | Installing: | ||
+ | | ||
+ | |||
+ | Transaction Summary | ||
+ | ================================================================================ | ||
+ | Install | ||
+ | |||
+ | Total download size: 161 k | ||
+ | Installed size: 418 k | ||
+ | Is this ok [y/d/N]: y | ||
+ | httpd-mod_jk-1.2.40-1.el7.centos.x86_64.rpm | ||
+ | Running transaction check | ||
+ | Running transaction test | ||
+ | Transaction test succeeded | ||
+ | Running transaction | ||
+ | Installing : httpd-mod_jk-1.2.40-1.el7.centos.x86_64 | ||
+ | Verifying | ||
+ | |||
+ | Installed: | ||
+ | httpd-mod_jk.x86_64 0: | ||
+ | |||
+ | Complete! | ||
+ | </ | ||
+ | |||
+ | Mit nachfolgendem Befehl kann überprüft werden, welche Inhalte mit den Paket **'' | ||
+ | < | ||
+ | # rpm -qil httpd-mod_jk | ||
+ | Name : httpd-mod_jk | ||
+ | Epoch : 0 | ||
+ | Version | ||
+ | Release | ||
+ | Architecture: | ||
+ | Install Date: Tue 12 May 2015 01:40:47 PM CEST | ||
+ | Group : Development/ | ||
+ | Size : 427794 | ||
+ | License | ||
+ | Signature | ||
+ | Source RPM : httpd-mod_jk-1.2.40-1.el7.centos.src.rpm | ||
+ | Build Date : Tue 05 May 2015 12:30:35 PM CEST | ||
+ | Build Host : vml000200.dmz.nausch.org | ||
+ | Relocations : (not relocatable) | ||
+ | URL : http:// | ||
+ | Summary | ||
+ | Description : | ||
+ | The mod_jk module add support for the Apache HTTP Server, to communicate as a front-end server | ||
+ | for Apache Tomcat Server or any other AJP1.3-enabled application server, with optional load-balancing. | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | </ | ||
+ | |||
+ | ===== 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