Apache Httpd Netware Binary Optionen


Arbeiten mit modjk. Table of Contents. What ist modjk. modjk ist ein Ersatz für die älteren modjserv Es ist ein völlig neues Tomcat-Apache Plug-in, das die Kommunikation zwischen Tomcat und Apache. Several Gründen. modjserv war zu komplex, weil es war Portiert von Apache JServ, es brachte mit ihm viele JServ spezifische Bits, die aren t benötigt von Apache. modjserv unterstützt nur Apache Tomcat unterstützt viele Web-Server durch eine Kompatibilitätsschicht namens jk Bibliothek Unterstützung von zwei verschiedenen Arbeitsweisen wurde problematisch in Bezug auf die Unterstützung , Dokumentations - und Bugfixes modjk sollte sicherstellen, dass der Layer-Ansatz, der von der jk-Bibliothek zur Verfügung gestellt wird, es einfacher macht, sowohl Apache1 3 x als auch zu unterstützen. Eine bessere Unterstützung für SSL modjserv konnte nicht zuverlässig identifizieren, ob eine Anfrage über oder modjk gemacht wurde Neuere Ajpv13-Protokoll. Was bedeutet es für mich. Sie müssen einen neuen vereinfachten Konfigurationsmechanismus kennenlernen Der Vorteil ist, dass das Lernen dieses Mechanismus Ihnen einen Vorsprung gibt, wenn Sie Tomcat auf Apache und anderen Webservern bereitstellen möchten Als Microsoft s Internet Information Server IIS und der iPlanet Enterprise Web Server. Definitionen und Terminologie. In diesem Dokument werde ich ein paar Begriffe verwenden, so lassen Sie sie definieren. Ein Arbeiter ist eine Tomcat-Instanz, die ausgeführt wird, um Servlet-Anfragen zu kommen Aus dem Web-Server In den meisten Fällen gibt es nur einen einzigen Arbeiter der ein und nur Kater Prozess, aber manchmal werden Sie mehrere Arbeiter laufen, um Lastverteilung oder Site-Partitionierung zu erreichen Jeder Arbeiter ist auf dem Web-Server durch den Host identifiziert wurde es sich befindet, die Port, wo es hört und das Kommunikationsprotokoll verwendet, um Nachrichten auszutauschen. Dies ist ein spezieller Arbeiter Anstatt mit einem Tomcat-Prozess zu arbeiten, der sich auf einem anderen Prozess befindet, öffnet der Webserver eine JVM und führt Tomcat im Web-Server-Prozess-Adressraum aus Unsere Diskussion in diesem Dokument wird nicht in diesen speziellen Arbeiter zu bekommen. Web Server Plug-in Tomcat Redirector. For Tomcat mit jedem Web-Server kooperieren braucht es einen Agenten, um in den Webserver zu wohnen und ihm Servlet-Anfragen Dies ist das Web-Server-Plug-in , Und in unserem Fall ist das Web-Server-Plug-In modjk Der Redirector kommt in der Regel in Form eines DLL - oder Shared-Objekt-Moduls, das Sie in den Webserver stecken. Wir müssen das Web-Server-Plug-In so konfigurieren, dass es weiß, wo Die verschiedenen Tomcat-Arbeiter sind und an welche von ihnen es Anfragen weiterleiten Diese Informationen, begleitet von einigen internen Parameter, wie die Log-Ebene, umfasst die Plug-in-Konfiguration. Web Server Configuration. Each Web-Server hat einige Konfiguration, die sein Verhalten definiert , Z. B. auf welchen Port zu hören, welche Dateien zu dienen, welche Web-Server-Plug-Ins zu laden, etc Sie müssen Ihre Web-Server-Konfiguration ändern, um es anzuweisen, um die Tomcat Redirector modjk. Obtaining modjk. modjk können in erhalten werden Zwei Formate - Binär und Quelle Abhängig von der Plattform, auf der Sie Ihren Webserver betreiben, kann eine Binärversion von modjk verfügbar sein. Es wird empfohlen, die Binärversion zu verwenden, falls vorhanden ist Wenn die Binärdatei nicht verfügbar ist, folgen Sie den Anweisungen zum Erstellen Modjk from source Notizen am Ende dieses Abschnitts bieten Empfehlungen für spezifische Plattformen. modjk Binaries. Binaries für modjk sind für mehrere Plattformen im gleichen Bereich wie die Tomcat Binary Release verfügbar Die Binärdateien befinden sich in Unterverzeichnissen auf der Plattform Für einige Plattformen, wie zB Windows, das ist die typische Art, modjk zu erhalten, da die meisten Windows-Systeme keine C-Compiler haben. Für andere bietet die binäre Verteilung von modjk eine einfachere Installation. Für Apache 1 3 für die Standard-API sowie EAPI und für Apache 2 0. Enthält die and. Contains die für Windows sowie andere nützliche binaries. Check die Website für die neuesten binaries. Note Die Version von modjk ist nicht abhängig von der Version von Tomcat Die Tomcat 3 3 Verteilung von modjk funktioniert korrekt mit anderen 3 x Versionen von Tomcat, wie Tomcat 3 2 1.Building modjk. modjk ist in Quellverteilung für alle Windows und die meisten Unix-Plattformen verfügbar Die Quelle für modjk ist in der Binärverteilung von Tomcat im TOMCATHOME nativen modjk-Verzeichnis enthalten. Dieses Verzeichnis wird von organisiert Web-Server-Name und - Version Jedes Verzeichnis enthält die Quelle sowie die entsprechenden Build-Scripts, Dateien oder Projektdateien. Building modjk für NT. Der Redirector wurde mit Visual C Version 6 0 entwickelt, so dass diese Umgebung eine Voraussetzung ist, wenn Sie Möchten Sie eine benutzerdefinierte build. The Schritte, die Sie benötigen, um zu nehmen. Wählen Sie Verzeichnis in das Apache1 3 oder Apache2 0 Quellverzeichnis je nach Ihrer Version von Apache. Setzen Sie eine APACHE1HOME Umgebungsvariable, die darauf hinweist, wo Ihr Apache installiert ist. Execute the Folgenden Befehl. MSDEV MAKE ALL. If Msdev ist nicht in deinem Pfad, geben Sie den vollständigen Pfad zu Auch, wird erwartet, dass in der APACHE1HOME src Debug oder APACHE1HOME src Release oder die älteren APACHE1HOME src CoreD oder APACHE1HOME src CoreR Verzeichnisse vor der Verknüpfung erfolgreich sein wird Sie müssen genug von der Apache-Quelle aufbauen, um die benötigte Librarie an das Apache-Modul-Verzeichnis zu erstellen. Dies wird sowohl Release - als auch Debug-Versionen des Redirector-Plug-In-Models erstellen. Eine Alternative wird es sein, in msdev zu öffnen und zu bauen Es mit dem Build-Menü. Building modjk für Unix. Machen Sie sicher, dass Ihr Apache DSO-Unterstützung Sie können dies mit - l Wenn Sie sehen, modso c in der Ausgabe, DSO-Unterstützung verfügbar ist Wenn es fehlt, müssen Sie möglicherweise neu kompilieren oder neu installieren Apache. Finden Sie aus, ob Ihr Apache EAPI-Unterstützung hat Wenn Sie es selbst aus der Quelle kompiliert haben, ist EAPI wahrscheinlich nicht kompiliert, es sei denn, Sie haben es selbst vielleicht mit modssl hinzugefügt. Sie müssen mit oder ohne EAPI erstellen, um Ihre Apache-Konfiguration anzupassen. Wenn Sie ein installieren Nicht übereinstimmend APACHEHOME bin apachectl configtest wird dich warnen. Stellen Sie sicher, dass Sie Perl 5 installiert haben Das apxs-Skript, das verwendet wird, um das Modul zu erstellen, ist in Perl geschrieben. Ändern Sie das Verzeichnis in TOMCATHOME native modjk apache1 3 oder apache2 0.Build Nachfolgend sind drei Techniken, die Sie ausprobieren können, In der Reihenfolge der Einfachheit. Run das Build-Skript für Ihre Plattform Wenn ein Build-Skript nicht für Ihre Plattform verfügbar ist, können Sie in der Lage, modjk mit diesem Skript wird einige Variablen, rufen Sie apxs wie unten, und versuchen, in APACHEHOME libexec kopieren Wenn es scheitert, müssen Sie die folgenden manuell. Stellen Sie JAVAHOME in Ihrer Shell, zB gesetzt JAVAHOME usr lokalen jdk1 3 1 Export JAVAHOME. set APACHEHOME in Ihrer Shell, zB setzen APACHEHOME usr lokalen Apache Export APACHEHOME. uncomment die folgende Zeile in der Datei, ersetzen linux mit dem Namen Ihrer Plattform, wie im Java-Include-Verzeichnis für Ihre Installation angegeben JAVAINCLUDE - I include - I include linux. If fehlschlägt, haben Sie vielleicht viel Glück mit den Makefiles im selben Verzeichnis, zB make - f. Schließlich kannst du versuchen, es manuell zu erstellen Führen Sie den apxs Befehl, der mit Ihrem Apache Verteilungshinweis kam, in usr lokaler Apache bin, usr sbin oder wo immer Sie installierten apache kamen. Geben Sie den Befehl alle auf einer Zeile ein. Für Linux apxs - o - I Jk - I usr lokal jdk include - I usr lokal jdk include linux - cc jk c Ihr Build kann fehlschlagen, weil die Objektdateien aus dem jk-Verzeichnis in das aktuelle Verzeichnis kompiliert wurden, anstatt ihr Quellverzeichnis Running gcc - shared - oo sollte Beenden Sie das build. Verwenden Sie das Skript wie folgt sh Dies wird in Ihrem Apache-Libexec-Verzeichnis erstellen und installieren Dieses Skript enthält Einstellungen für Ihre Java - und Apache-Heimatstandorte Stellen Sie sicher, dass diese nach Ihrer Installation festgelegt sind. Die Standardeinstellungen sind JAVAHOME usr java und APACHEHOME Usr local apache Wenn deine Installation anders ist, musst du das Skript bearbeiten und diese Werte entsprechend ändern. Siehe in TOMCATHOME native modjk apache1 3 für weitere Informationen. Wenn das Build-Skript nicht funktioniert, können Sie auch modjk wie folgt APACHEHOME Bin apxs - o - DSOLARIS - I jk - I usr java include - I usr java include solaris - cc jk c. Verwenden Sie das Skript wie folgt sh Dies wird bauen und installieren in Ihrem Apache libexec Verzeichnis Dieses Skript enthält Einstellungen für Ihr Java und Apache Heimatstandorte Vergewissern Sie sich, dass diese nach Ihrer Installation eingestellt sind. Die Standardeinstellungen sind JAVAHOME opt java1 3 und APACHEHOME usr lokaler Apache Wenn Ihre Installation anders ist, müssen Sie das Skript bearbeiten und diese Werte entsprechend ändern. Beachten Sie auch, dass es zwei gibt HP-UX Build-Skripte Ein Skript wurde geschrieben, um modjk ohne JNI-Unterstützung mit GNU GCC zu bauen. Das andere Skript baut modjk mit JNI-Unterstützung auf, aber dieses Skript benötigt den HP ANSI C Compiler nicht den abgespeckten C-Compiler, der mit HP-UX zum Wiederaufbau enthalten ist Der Kernel Der HP Compiler ist erforderlich, da die dlopen und die zugehörigen gemeinsamen Bibliotheken nur für 64-Bit-Anwendungen verfügbar sind und eine zuverlässige 64-Bit-Kompilierung mit der aktuellen Version von GCC nicht verfügbar ist. Das Skript sollte auch für HP-UX 10 00 funktionieren. Sehen Sie sich in TOMCATHOME native modjk apache1 3 für weitere Informationen. Für andere Unixes einschließlich FreeBSD. Das Skript sollte für IRIX und AIX modifizierbar Bearbeiten Sie das Skript und ändern Sie die APACHEHOME und JAVAHOME Standorte wie erforderlich. Wenn Sie EAPI verwenden, versuchen Sie - DEAPI Auf den apxs-Befehl nach. Wenn apxs mit apxs fehlschlägt Break Command fehlgeschlagen mit rc 255 kann es durch modssl beschädigt worden sein Suchen und ändern zu Wenn Sie Java in einem anderen Verzeichnis installiert haben, passen Sie entsprechend an. Für andere Unixe sollten Sie in der Lage sein zu arbeiten Es aus, aber denken Sie daran, dass die Reihenfolge der Argumente an apxs ist wichtig. Jetzt, kopieren Sie die modjk Bibliothek cp APACHEHOME libexec Beachten Sie, dass die Build-Skripte versuchen, dies zu tun, aber Sie müssen zuerst su. Other Webserver. Es gibt mehrere Makefiles In den anderen Verzeichnissen unter dem Verzeichnis TOMCATHOME native modjk Sie sollten auch die Tomcat-Dokumentation auf spezifische Informationen in Bezug auf andere Web-Server überprüfen. Konfigurieren von Apache. Dieser Abschnitt beschreibt die Konfiguration, die für den Apache Web Server benötigt wird, um modjk. Removing modjserv directives zu unterstützen. Wenn Sie zuvor Apache konfiguriert haben, um modjserv zu verwenden, entfernen Sie alle ApJServMount-Richtlinien von Ihrem Wenn Sie wieder einschließen oder Sie möchten sie auch entfernen - sie sind spezifisch für modjserv Die modjserv Konfigurationsrichtlinien sind nicht kompatibel mit modjk. Configure Apache, um modjk zu verwenden. Die einfachste Art, Apache zu konfigurieren, um modjk zu verwenden, ist, Tomcat zu verwenden, um die modjk-Konfigurationsdatei zu erzeugen und die folgende Include-Direktive am Ende deiner Apache-Datei zu setzen. Vergewissern Sie sich, dass Sie TOMCATHOME durch den korrekten Pfad für Ihre Tomcat-Installation ersetzen Apache, um Anweisungen in der Datei in der Apache-Konfiguration zu verwenden Diese Datei wird erstellt, indem du Tomcat mit der Option jkconf startet. Tomcat wird initialisieren, die Konfigurationsdatei schreiben und dann beenden. Dies kann getan werden, während eine Instanz von Tomcat ausgeführt wird. Optionen zum Steuern, wie das modjk Konfigurationsdatei wird im Konfigurations-Tomcat-Abschnitt beschrieben. Konfigurieren von Tomcat. NOTE Wenn Sie die Tomcat-generierte Konfiguration verwenden möchten, überspringen Sie den Rest dieses Abschnitts und fahren Sie mit dem Konfigurieren von Tomcat-Abschnitten fort. Mit der Aktivierung der Auto - Konfiguration und Kopieren der Datei in Ihre eigene Konfigurationsdatei, wie zB die Grundkonfiguration ist wie folgt. Sie ​​müssen Apache anweisen, um Tomcat zu laden Dies kann mit Apache s LoadModule und AddModule Konfigurationsrichtlinien durchgeführt werden. Sie müssen modem die Lage von Ihre Datei Verwenden Sie modjk s JkWorkersFile Konfigurationsrichtlinie. Sie sollten einen Speicherort angeben, in dem modjk seine Protokolldatei platzieren wird und eine Log-Ebene verwendet werden soll Verwenden Sie die JkLogFile - und JkLogLevel-Konfigurationsrichtlinien Mögliche Protokollstufen sind Debug-Info-Fehler und emerg Wenn das JkLogLevel ist Nicht spezifiziert, wird kein Protokoll generiert. Die Direktive JkLogStampFormat konfiguriert das Datum Zeitformat auf modjk Logdatei gefunden Mit Strftime Format String ist es s standardmäßig auf abd HMS YA einfaches Beispiel wäre, um die folgenden Zeilen in Ihre Datei enthalten. Assigning URLs zu Tomcat. Wenn Sie eine benutzerdefinierte oder lokale Version wie oben beschrieben erstellt haben, können Sie Einstellungen wie die Mitarbeiter oder URL prefix. Use modjk s JkMount-Direktive, um bestimmte URLs zu Tomcat zuzuordnen Im Allgemeinen ist die Struktur einer JkMount-Direktive zum Beispiel Die folgenden Anweisungen werden alle Anfragen senden, die mit dem Servlet an den ajp13-Arbeiter enden oder anfangen, aber jsp-Anfragen an Dateien, die sich in anderen Arbeitern befinden, gehen an remoteworker Sie können die JkMount-Direktive auf der obersten Ebene oder in den VirtualHost-Abschnitten Ihrer Datei verwenden. Konfigurieren von Tomcat. Enabling Tomcat s Apache Auto-Config. In den meisten einfachen Fällen Tomcat kann die benötigte Apache-Konfiguration generieren Die Standardinstallation von Tomcat wird konfiguriert, um eine Konfigurationsdatei auf Anfrage für Apache zu generieren, um modjk zu verwenden. Die meiste Zeit müssen Sie nichts tun Aber diese Datei anhängen Include in deinem wie im vorherigen Abschnitt Configuring Apache. To haben Tomcat die Konfigurationsdatei zu generieren, starten Tomcat mit der jkconf Option Tomcat wird initialisieren, schreiben Sie die Konfigurationsdatei, und dann beenden Dies kann während einer Instanz durchgeführt werden Von Tomcat läuft. Die Generierung der modjk-Konfigurationsdatei wird vom ApacheConfig-Modul gesteuert Die Standardinstallation von Tomcat 3 3 erfolgt mit der bereits vorhandenen ApacheConfig-Direktive in der. Note Die Generierung der modjk-Konfigurationsdatei ist bei Tomcat 3 3 Older neu Versionen von Tomcat erstellen die Autokonfigurationsdatei ohne eine Richtlinie und generieren sie jedes Mal, wenn Tomcat gestartet wird. Die neue ApacheConfig-Direktive in Tomcat 3 3 ermöglicht zusätzliche Konfigurationsoptionen, wie in diesem Abschnitt beschrieben. Für ältere Tomcat-Versionen finden Sie in der Dokumentation Das kam mit dieser Version. Wenn Sie spezielle Bedürfnisse haben, zum Beispiel Anbringen von URL-Präfixen, die nicht die Standardeinstellung sind, können Sie diese Datei als Basis für Ihre benutzerdefinierte Konfiguration verwenden und die Ergebnisse in einer anderen Datei speichern. Wenn Sie die Apache-Konfiguration selbst verwalten, Ll muss es aktualisieren, wann immer Sie einen neuen Kontext hinzufügen. Hinweis, dass Sie tomcat und apache neu starten müssen, nachdem Sie einen neuen Kontext hinzugefügt haben Apache unterstützt keine Konfigurationsänderungen ohne Neustart Auch die Datei wird generiert, wenn Tomcat startet, also musst du Tomcat starten Bevor Apache Tomcat jedes Startup überschreiben wird, so maßgeschneiderte Konfiguration sollte an anderer Stelle aufbewahrt werden. Zum Beispiel kopieren Sie, bevor Sie Änderungen vornehmen Sie müssen Tomcat mit der Option jkconf einmal starten, um diese Datei mit Ihrer Konfiguration zum ersten Mal zu generieren. Es ist auch möglich Geben Sie den Speicherort der automatisch generierten Dateien an, indem Sie Optionen im Block "ApacheConfig" festlegen. Folgende Details werden mit der Syntax verknüpft, in denen die Optionen eines der folgenden Attribute enthalten können. configHome - Standard-übergeordnetes Verzeichnis für die folgenden Pfade Wenn nicht gesetzt, wird standardmäßig TOMCATHOME ignoriert, Der folgenden Pfade ist absolut. jkConfig - Pfad für das Schreiben von Apache modjk conf Datei Wenn nicht gesetzt, defaults to. workersConfig - Pfad zu Datei, die von modjk verwendet wird Wenn nicht gesetzt, defaults auf. modJk - Pfad zu Apache modjk Plug-in-Datei Wenn nicht gesetzt, defaults auf Windows, auf netware und überall else. jkLog - Pfad zur Protokolldatei, die von modjk. jkDebug verwendet werden soll - JK Loglevel-Einstellung Kann Debug, Info, Fehler oder emerg sein Wenn nicht gesetzt, standardmäßig auf no Log. jkWorker Der gewünschte Arbeiter muss auf einen der in der Datei definierten Arbeiter eingestellt sein, ajp13 oder inprocess sind die Arbeiter, die in der Standarddatei gefunden werden Wenn nicht angegeben, wird standardmäßig ajp13 verwendet, wenn ein Ajp13Connector verwendet wird, andernfalls ist er standardmäßig auf ajp12 gesetzt. forwardAll - Wenn es wahr ist, alle Anfragen an Tomcat weiterleiten Hiermit wird sichergestellt, dass das gesamte in der Datei konfigurierte Verhalten korrekt funktioniert. Wenn false, lassen Sie Apache statische Ressourcen ausführen. Die Voreinstellung ist true Warnung Wenn false, wird eine Konfiguration in dem möglicherweise nicht in Apache dupliziert Überprüfen Sie die modjk conf-Datei, um zu sehen, welche Konfiguration tatsächlich in Apache. noRoot gesetzt wird. Wenn true, wird der Root-Kontext nicht auf Tomcat abgebildet. Wenn false und forwardAll wahr ist, werden alle Anforderungen an den Root-Kontext auf Tomcat If false und forwardAll abgebildet Ist falsch, nur JSP - und Servlets-Anfragen an den Root-Kontext werden auf Tomcat abgebildet Wenn false, um Tomcat-Wurzel-Kontext korrekt zu bedienen, musst du auch die DocumentRoot-Einstellung in der Apache-Datei ändern, um auf das Tomcat-Root-Kontextverzeichnis zu verweisen Da Apache s von Apache bedient wird, bevor modjk eine Chance bekommt, die Anforderung zu beanspruchen und an Tomcat weiterzugeben. Die Voreinstellung ist true. Note Die Standard-Modjk-Konfigurationsdatei, die von der von Tomcat 3 generierten Datei erzeugt wird 2 2 In Tomcat 3 3, Die Voreinstellung ist, alle Anfragen an Tomcat für Tomcat-Kontexte weiterzuleiten, dh forwardAll true, ohne den Root-Kontext Dies hilft sicherzustellen, dass das in Dateien konfigurierte Verhalten ordnungsgemäß funktioniert Die Konfiguration, die am besten mit Tomcat 3 2 x Verhalten übereinstimmt, ist mit dieser Konfiguration JSP und Servlet Anfragen an den Root-Kontext werden von Tomcat s ROOT webapp bedient. Andere Anfragen, wie z. B. für statische Dateien, werden aus dem Apache-Dokument DocumentRoot-Verzeichnis bereitgestellt. Wenn Apache s DocumentRoot nicht aktualisiert wird, um auf Tomcat s ROOT webapp zu zeigen, dann wird der Root-Kontext Störung Zum Beispiel können JSPs, die in Tomcat s ROOT webapp verweisen, sie nicht anzeigen können, da sie unter dem Apache s DocumentRoot Verzeichnis gefunden wurden. Optional Konfigurieren von Tomcat zur Verwendung des Ajpv13-Protokolls. modjk kann entweder das ursprüngliche Ajpv12-Protokoll oder das neuere Ajpv13-Protokoll verwenden. Beide Protokolle sind standardmäßig aktiviert Der Ajp13 Connection Handler in Tomcat gibt Ihnen den Vorteil eines schnelleren Protokolls und die Möglichkeit, Anfragen zu identifizieren Via. Die Standardinstallation von Tomcat 3 3 kommt mit Connectors für beide Protokolle in der Standard-Wahl durch die ApacheConfig-Direktive wird es sein, den ajp13-Worker zu verwenden, der das Ajpv13-Protokoll verwendet. Obwohl modjk das Ajpv13 standardmäßig verwendet, solltest du das nicht entfernen Ajpv12-Stecker in der Datei vorhanden Der Ajpv12-Stecker wird auch zum Abschalten von Tomcat verwendet. Optional Definieren Arbeiter. Konfigurieren Arbeiter manuell. Worker sind mit der Datei konfiguriert Es gibt eine Menge Informationen in der Howto-Dokument, und Sie sollten wirklich schauen, dass erste Wenn Sie in Eile aber können Sie wahrscheinlich weg mit der Bearbeitung der Datei und Einstellung der und ps-Variablen auf die richtigen Werte für Ihr System. Example Configuration. Here s eine Beispiel-Konfiguration, die wahrscheinlich reflektiert viele reale Welt Setups Eine Website ist mit Tomcat und Apache mit zwei virtuellen Hosts einer von ihnen auch verwenden, die Wir gehen davon aus, dass wir von modssl. URLs beendet werden und mit dem Servlet beginnen, werden von Tomcat behandelt, der Rest wird von Apache behandelt. Die Dateien für jeden Host sind Server aus Web Host1 und Web Host2. Das Beispiel ist über-vereinfacht und Unvollständig aber sollte dich anfangen auch beachten, diese Form virtuellen Host-Setup ist neu in Tomcat 3 3 und später - dieses Beispiel gewann t Arbeit mit Tomcat 3 2 und früher. Tabelle 1 - Auszug aus der Anzeige der Ajp12 und Ajp13 Connectors. Table 4 - Auszug aus Apachen mit JK-Direktiven. Troubleshooting und FAQ sQ Wo bekomme ich Hilfe-Unterstützung für modjk. A Der primäre Mechanismus für die Unterstützung ist durch die Tomcat-Dokumentation im TOMCATHOME doc-Verzeichnis enthalten Diese Dokumente sind über Browser über Tomcat Dokumentation auch verfügbar verfügbar Die Apache Jakarta Website für Tomcat at. For zusätzliche Hilfe, die beste Ressource ist die Tomcat User Diskussion Liste Sie sollten mit der Suche nach der Mail-Liste Archive an oder vor Ihnen stellen Sie Fragen an die Liste Wenn Sie nicht in der Lage, die Antwort zu finden Ihre Frage im Archiv, können Sie Fragen über Tomcat oder modjk an die Benutzerliste für die Hilfe stellen Stellen Sie sicher, dass Sie die Version von Apache und Tomcat, die Sie verwenden sowie die Plattform, die Sie auf laufen. QI können Sie finden modjk Überall wo ist es. Mit Tomcat 3 3 ist die Quelle für modjk mit der binären Verteilung im nativen modjk-Verzeichnis enthalten. Du kannst auch die Quellverteilung von Tomcat herunterladen, um die Quelle für modjk zu erhalten, wie es war In Versionen vor Tomcat 3 3 Die Binärverteilungen von modjk sind an der gleichen Stelle wie die Binärverteilung von Tomcat verfügbar. Die modjk-Binärdateien befinden sich in den Unterverzeichnissen der Plattform. Im Mai 2001 wurden die Jakarta-Tomcat-Connectors gestartet und Sie finden Hier up to date featured modjk dh neue protokolle AJP14 WARP. Q Welches Protokoll sollte ich Ajp12 oder Ajp13 verwenden. A Ajp13 ist ein neueres Protokoll, es ist schneller und es funktioniert besser mit SSL Sie fast sicher wollen, es zu verwenden Es gibt mehr Informationen In der howto document. Q Immer wenn ich Tomcat neu starten, schließt Apache ein. Das Ajp13-Protokoll hält eine offene Sockel zwischen Tomcat und Apache Die neueste Version von modjk, die seit Tomcat 3 3-m2 und JTC das Netzwerk-Ausfall behandeln Aber mit vorherigen Release von modjk, müssen Sie möglicherweise Apache als gut. Q Warum müssen zwei Dateien existieren - eapi ad - noeapi im Download-Verzeichnis für Linux. A Viele Versionen von Apache verwenden eine modifizierte API, bekannt in Extended API Zum Beispiel, Apache mit modssl Und der Apache in einigen neuen Linux-Distributionen präsentieren Also, wenn Sie einen Extended Apache haben, müssen Sie verwenden und verwenden für Standard-Apache Es ist sinnvoll zu vermeiden, EAPI-Module auf Standard-API Apache und Standard-API-Module auf EAPI Apache Immer sicher sein zu haben Die für deine Version von Apache. Q Was ist diese Botschaft über verstümmelte DSO. A Es s im Zusammenhang mit Apache EAPI Die Nachricht ist verstümmelt - vielleicht ist dies kein Apache-Modul DSO gerade gesagt, dass Sie versuchen, ein DSO-Modul zu installieren, das kompiliert wurde Ein Apache mit EAPI, wie Apache-modssl oder Apache von Redhat distro 6 2 7 0 Allerdings ist Ihr System mit dem Standard-Apache mit der normalen API. Q Und die Meldung über Modul könnte unter EAPI. A Absturz zu EAPI, Die Nachricht warn Loaded DSO verwendet einfaches Apache 1 3 API, dieses Modul könnte unter EAPI abstürzen, bitte kompilieren Sie es mit - DEAPI, das wurde unter normalem Apache mit Standard-API kompiliert und Sie versuchen, das Modul auf einem Apache mit EAPI. Q zu installieren. Wo Kann ich mehr informationen bekommen. Das Howto-Dokument hat deutlich mehr vertiefende Informationen als diese, und ist einen Blick wert Sie könnten auch versuchen, die Mailing-Liste Archive für modjk oder Blick auf die Quelle. Q APXS bekommt einen Fehler während Der Build von modjk, wie rc 0 oder rc 255 Ich habe alle Schritte in der Build-Sektion versucht, was mache ich jetzt. A APXS ist ein Perl-Skript, das erstellt wird, wenn Sie den Apache-Webserver aus der Quelle erstellen Chancen sind, dass wenn Sie erhalten diese Fehler und Sie erhielten Apache als binäre Verteilung, dass APXS nicht korrekt für Ihr System konfiguriert ist. Ihre beste Wette ist, die Apache-Quelle zu holen und sie selbst zu bauen. Verwenden Sie die folgenden für einen grundlegenden Aufbau, lesen Sie die Apache-Dokumente für andere Optionen Hinweis Die obigen Schritte gehen davon aus, dass Sie die Apache-Quelle heruntergeladen und in Ihr usr lokales src Verzeichnis gestellt haben. Q Warum doesn t meine Formularauthentifizierung funktioniert Ich bekomme ähnliche Fehlermeldungen von Apache. A Wenn Sie manuelle Konfiguration wie. Using Apache verwendet haben Mit Novell NetWare. unload Adressraum apache2 apache2.Wenn man mit Apache arbeitet, ist es wichtig zu wissen, wie es die Konfigurationsdateien finden Sie können eine Konfigurationsdatei auf der Kommandozeile auf zwei Arten angeben.-F gibt einen Pfad zu einer bestimmten Konfigurationsdatei an. apache2 - f vol my. In diesen Fällen sollte die richtige ServerRoot in der Konfigurationsdatei gesetzt werden. Wenn Sie don t angeben einen Konfigurationsdateiname mit - f Apache wird den Dateinamen in den Server kompiliert, in der Regel Aufrufen von Apache mit der - V-Schalter zeigt diesen Wert an, der als SERVERCONFIGFILE markiert wird. Apache wird dann seinen ServerRoot bestimmen, indem er das folgende in dieser Reihenfolge ausführt. Eine ServerRoot-Direktive über eine - C-switch. - d schalte die Befehlszeile ein. Current working directory. The server root Kompiliert in den Server. Der Server-Root kompiliert in den Server ist in der Regel sys apache2 Aufruf Apache mit der - V-Schalter wird diesen Wert als. Apache 2 0 für NetWare markiert enthält eine Reihe von Befehlszeilen-Direktiven, die verwendet werden können, um zu ändern oder anzuzeigen Informationen über die laufende Instanz des Webservers Diese Richtlinien sind nur verfügbar, während Apache läuft Alle dieser Richtlinien muss das Schlüsselwort APACHE2.RESTART vorangestellt werden. Weist Apache an, alle laufenden Worker-Threads zu beenden, während sie im Leerlauf sind, die Konfigurationsdatei erneut lesen und neu starten Jeder Worker-Thread basierend auf der neuen Konfiguration VERSION Zeigt Versionsinformationen über die aktuell laufende Instanz von Apache an MODULES Zeigt eine Liste der geladenen Module an, die sowohl eingebaut als auch extern sind. RICHTLINIEN Zeigt eine Liste aller verfügbaren Richtlinien an. EINSTELLUNGEN Aktiviert oder deaktiviert die Threadstatusanzeige auf der Konsole Wenn aktiviert, wird der Status der laufenden Threads auf dem Apache-Konsolenbildschirm angezeigt. SHUTDOWN Beendet die laufende Instanz des Apache-Webservers HELP Beschreibt jede der Runtime-Direktiven. Diese Vorgaben werden standardmäßig gegen die im OS laufende Instanz von Apache ausgegeben Adressraum Um eine Richtlinie gegen eine bestimmte Instanz auszuführen, die in einem geschützten Adressraum ausgeführt wird, müssen Sie den Parameter - p zusammen mit dem Namen des Adressraums eingeben. Weitere Informationen Typ apache2 Hilfe auf der Befehlszeile. Apache wird durch das Lesen von Konfigurationsdateien konfiguriert, die normalerweise gespeichert sind Im conf-Verzeichnis Dies sind die gleichen wie Dateien, die zur Konfiguration der Unix-Version verwendet werden, aber es gibt ein paar verschiedene Direktiven für Apache auf NetWare Siehe die Apache-Dokumentation für alle verfügbaren Direktiven. Die Hauptunterschiede in Apache für NetWare sind. Weil Apache für NetWare ist multithreaded, es verwendet keinen separaten Prozess für jede Anfrage, da Apache bei einigen Unix-Implementierungen funktioniert. Stattdessen gibt es nur Threads, die einen übergeordneten Thread ausführen, und mehrere untergeordnete oder Worker-Threads, die die Anforderungen behandeln. Daher sind die Prozessmanagement-Richtlinien Different. MaxRequestsPerChild - Wie die Unix-Direktive, steuert dies, wie viele Anfragen ein Worker-Thread vor dem Beenden vergeben wird. Die empfohlene Voreinstellung, MaxRequestsPerChild 0 bewirkt, dass der Thread die Serviceanforderung auf unbestimmte Zeit fortsetzt. Es wird auf NetWare empfohlen, es sei denn, es gibt einen bestimmten Grund dafür Direktive bleibt immer auf 0 gesetzt. StartThreads - Diese Anweisung teilt dem Server mit, wie viele Threads es anfänglich starten soll. Die empfohlene Voreinstellung ist StartThreads 50.MinSpareThreads - Diese Anweisung weist den Server an, zusätzliche Worker-Threads zu erzeugen, wenn die Anzahl der Leerlauf-Threads jemals darunter fällt Value Die empfohlene Voreinstellung ist MinSpareThreads 10.MaxSpareThreads - Diese Anweisung weist an, dass der Server mit der Beendigung von Worker-Threads beendet wird, wenn die Anzahl der Leerlauf-Threads jemals diesen Wert überschreitet. Der empfohlene Standardwert ist MaxSpareThreads 100.MaxThreads - Diese Richtlinie beschränkt die Gesamtzahl der Work-Threads auf ein Maximalwert Die empfohlene Voreinstellung ist ThreadsPerChild 250.ThreadStackSize - Diese Anweisung teilt dem Server mit, welche Größe des Stacks für den einzelnen Arbeitsthread verwendet werden soll. Die empfohlene Voreinstellung ist ThreadStackSize 65536. Die Richtlinien, die Dateinamen als Argumente akzeptieren, müssen NetWare-Dateinamen anstelle von Unix-Namen verwenden , Da Apache Unix-Style-Namen intern verwendet, müssen Schrägstriche eher als Backslashs verwendet werden. Es wird empfohlen, dass alle verwurzelten Dateipfade mit einem Datenträgernamen beginnen. Wenn ausgelassen, nimmt Apache das SYS-Volume an, das möglicherweise nicht korrekt ist. Apache für NetWare hat Die Möglichkeit, Module zur Laufzeit zu laden, ohne den Server neu zu kompilieren Wenn Apache normal kompiliert wird, wird eine Reihe von optionalen Modulen im Apache2-Modulverzeichnis installiert. Um diese oder andere Module zu aktivieren, muss die LoadModule-Direktive verwendet werden Das Status-Modul, verwenden Sie die folgenden. LoadModule statusmodule. Informationen zum Erstellen von ladbaren Modulen ist auch available. CGIMapExtension - Diese Direktive ordnet eine CGI-Dateierweiterung zu einem Skript Interpreter. SecureListen - Aktiviert SSL-Verschlüsselung für einen bestimmten Port. NWSSLTrustedCerts - Fügt vertrauenswürdige Zertifikate hinzu Werden verwendet, um sichere Verbindungen zu Proxy-Servern herzustellen. NWSSLUpgradefähig - Erlaube eine Verbindung, die auf dem angegebenen Adressport erstellt wurde, um auf eine SSL-Verbindungsaufstellung zu aktualisieren Apache erfordert MetroWerks CodeWarrior 6 x oder höher Sobald Apache gebaut wurde, kann es in den Root von installiert werden Beliebiges NetWare-Volume Die Voreinstellung ist das sys Apache2-Verzeichnis. Bevor Sie den Server ausführen, müssen Sie das conf-Verzeichnis ausfüllen. Kopieren Sie die Datei aus dem Distributions-Konfoc-Verzeichnis und benennen Sie es um, um die Datei zu bearbeiten, die nach allen Wert-Markern sucht und sie mit der entsprechenden Einstellung kopiert Über die Conf-Magie und Dateien auch Alternativ kann eine komplette Verteilung erstellt werden, indem sie die Keyword-Installation bei der Aufruf der makefiles enthält. Die folgenden Entwicklungswerkzeuge sind erforderlich, um Apache 2 0 für NetWare zu erstellen. Setzen Sie die Umgebungsvariable NOVELLLIBC an den Speicherort der NetWare-Bibliotheken für C-SDK, zum Beispiel. Stellen Sie die Umgebungsvariable METROWERKS an den Speicherort, an dem Sie den Metrowerks CodeWarrior-Compiler installiert haben. Set METROWERKS C Programmdateien Metrowerks CodeWarrior. Wenn Sie auf den Standardspeicherort installiert haben C Program Files Metrowerks CodeWarrior Sie don Ich muss das einstellen. Setzen Sie die Umgebungsvariable LDAPSDK an den Speicherort ein, an dem Sie die LDAP-Bibliotheken für C installiert haben. Stellen Sie die Umgebungsvariable ZLIBSDK an den Speicherort ein, an dem Sie den Quellcode für die ZLib-Bibliothek installiert haben Umgebungsvariable APWORK auf den vollständigen Pfad des Verzeichnisses. Stellen Sie die Umgebungsvariable APRWORK auf den vollständigen Pfad des Verzeichnisses ein. Stellen Sie sicher, dass der Pfad zum AWK-Dienstprogramm und der GNU-Dienstprogramm in das System s PATH-Umgebungsvariable aufgenommen wurde Den Quellcode und entpacken Sie zu einem passenden Verzeichnis auf Ihrem workstation. Change Verzeichnis zu und bauen, indem Sie gmake - f nwgnumakefile. Copy die Datei auf das SYS-Volumen eines NetWare-Servers und laufen mit dem folgenden Befehl. SYS genuri sys uridelims h. Copy Die Datei uridelims h in das Verzeichnis auf der build machine. Change Verzeichnis zu und bauen APR durch Ausführen von gmake - f nwgnumakefile. Change Verzeichnis zu und bauen, indem Sie gmake - f nwgnumakefile. Change Verzeichnis zu und bauen, indem Sie gmake - f nwgnumakefile. Copy Die Dateien und aus ihren jeweiligen Verzeichnissen in das SYS-Volume eines NetWare-Servers und führen sie mit den folgenden Befehlen aus. SYS genchars sys testchar h SYS dftables sys chartables c. Copy die Dateien testchar h und chartables c in das Verzeichnis auf dem Build-Rechner. Ändern des Verzeichnisses und Erstellen von Apache durch Ausführen von gmake - f nwgnumakefile Sie können ein Verteilungsverzeichnis erstellen, indem Sie dem Befehl einen Installationsparameter hinzufügen, z. B..gmake - f nwgnumakefile install. gmake - f nwgnumakefile. Builds Release Versionen aller Binärdateien und copies them to a release destination directory. gmake - f nwgnumakefile DEBUG 1.Builds debug versions of all of the binaries and copies them to a debug destination directory. gmake - f nwgnumakefile install. Creates a complete Apache distribution with binaries, docs and additional support files in a dist Apache2 directory. gmake - f nwgnumakefile installdev. Same as install but also creates a lib and include directory in the destination directory and copies headers and import files. gmake - f nwgnumakefile clean. Cleans all object files and binaries from the release or debug build areas depending on whether DEBUG has been defined. gmake - f nwgnumakefile clobberall. Same as clean and also deletes the distribution directory if it exists. Download from your nearest mirror site. Please do not download from Use a mirror site to help us save bandwidth and to speed up your download Click here to find your nearest mirror. Apache Server on Windows. For the latest information about Apache server on Windows, including other sources for binaries, see the platform documentation here. The Apache Server Project itself does not provide binary releases of software, only source code Individual committers may provide binary packages as a convenience, but it is not a release deliverable. If you cannot compile the Apache Server yourself, you can obtain a binary package from numerous binary distributions available on the Internet. Popular options for deploying Apache and, optionally, PHP and MySQL, on Microsoft Windows, include. Warning TCP IP networking must be installed. TCP IP must be correctly installed, configured and running in order to install and use Apache on Windows If you use dial-up networking exclusively, you may need to be connected to the internet for Apache to correctly determine that TCP IP is installed. If you are installing Apache on Windows 95, 98, ME or NT 4 0, stop. Read the LEGACY notes first. If you are installing Apache on Windows XP prior to Service Pack 3.Install the Windows XP Service Pack 3 Refer to KB article 317949 if you need the gory details exactly why you must not run the original Windows XP or SP1.Warning about the Quality of Service driver. We suggest disabling the Quality of Service or QoS network driver from Microsoft if you primarily use the machine as an Apache Server, as Apache does not support the QoS extensions to the WinSock API. Warning about Firewall and similar software. Most Firewall programs, Web Spam filters and other TCP IP driver-based products including spyware do not correctly implement the entire WinSock API The shortcuts taken by the developers of such products cause Apache to fail If you insist on leaving such programs installed, and have problems with your Apache installation, consider the suggestion below. If you encounter problems running Apache 2 under Windows, such as corrupted or incomplete file downloads, unexplained error messages, or a conflict with a software firewall, please place the following three directives in your configuration file to see if they eliminate the problems. The general problem is that many people install various add-ons to windows such as software firewalls, virus checkers, etc that break some of the advanced functionality that Apache uses to speed the sending of files The above directives turn off the advanced functionality and make Apache fall back to more basic but slower techniques This resolves most, but not all of the potential problems If you continue to experience problems, be certain that there is no spyware installed on the box, which exhibits exactly the same sorts of flaws often more obviously. If you encounter problems installing Apache distributions, we have provided the TROUBLESHOOTING page to help you diagnose and fix most common installation problems. Do not report configuration or installation questions as bugs. The Apache User Support Mailing List and the newsgroup both provide peer to peer support Pose your question or problem on only one forum at a time If you do not follow these guidelines, your questions and pleas for assistance will likely go unanswered To learn how to get questions answered effectively, you might want to read How to Ask Questions the Smart Way written by Eric S Raymond and Rick Moen - which is a very good primer for end users to learn to pose effective questions to their fellow users and the project s developers NOTE they will only help you learn to ask questions , Eric and Rick do not provide you help with Apache Server. The packages do not contain any cryptographic software, such as OpenSSL, modssl, nor enabled utilities. The package includes an enabled utility, TLS SSL protocol module, and a binary distribution of the specified version of OpenSSL Please review the Cryptographic Software Notice carefully before downloading, using or redistributing this package. Looking for an older version Please, don t There have been a number of essential bug and security fixes with the evolving support for Apache under Win32 Most critically , there were several denial of service, arbitrary code execution and other vulnerabilities affecting Win32 in previous releases Please, avoid all earlier versions That said. Only current, recommended releases are available from and the mirror sites Older releases, and their corresponding debugging packages, can be obtained from the archive site. You can find a corresponding archive of the debugging databases in the symbols directory, these are typically not needed This archive can be unpacked into the Apache installation directory, providing all of the diagnostic files allowing most Win32 debugging tools and the Dr Watson utility to produce useful crash analysis. You will find the source code package in the source tree The file contains only source and build files, and contains no binary executable files. This binary release was created with Visual Studio 6 0, using a more recent Platform SDK for the ldap api It includes for. If you want to build against OpenSSL, that is available in source code form at. This distribution may include software that has been designed for use with cryptographic software The country in which you currently reside may have restrictions on the import, possession, use, and or re-export to another country, of encryption software BEFORE using any encryption software, please check your country s laws, regulations and policies concerning the import, possession, or use, and re - export of encryption software, to see if this is permitted See for more information. The US Government Department of Commerce, Bureau of Industry and Security BIS , has classified this software as Export Commodity Control Number ECCN 5D002 C 1, which includes information security software using or performing cryptographic functions with asymmetric algorithms The form and manner of this Apache Software Foundation distribution makes it eligible for export under the License Exception ENC Technology Software Unrestricted TSU exception see the BIS Export Administration Regulations, Section 740 13 for both object code and source code. The following provides more details on the included files that may be subject to export controls on cryptographic software. Apache 2 includes the modssl module under modules ssl for configuring and listening to connections over SSL encrypted network sockets by performing calls to a general-purpose encryption library, such as OpenSSL or the operating system s platform-specific SSL facilities. In addition, some versions of apr-util provide an abstract interface for SSL encrypted network sockets in the files under the directory srclib apr-util ssl that makes use of a general-purpose encryption library, such as OpenSSL or the operating system s platform-specific SSL facilities Apache currently does not use that apr-util interface. Some object code distributions of Apache indicated with the word crypto in the package name, may include object code for the OpenSSL encryption library as distributed in open source form from. The above files are optional and may be removed if the cryptographic functionality is not desired or needs to be excluded from redistribution Distribution packages of Apache that include the word nossl in the package name have been created without the above files and are therefore not subject to this notice. Setting Up the Apache Web Server Under Linux. by Andy Kahn. This article is basically a summary of my experiences of setting up a web server under Linux I will start with where how to obtain Apache, then move on to installation, configuration, and finally how to get things running This article is written from the point of view of my system, which is a Red Hat 4 0 system with v2 0 25 of the kernel However, a generic installation or a similar setup should apply as well. Where To Get Apache. The obvious place to get the latest version of Apache is off of the Apache web site The source distribution file is while the Linux ELF binaries is Grab what you find is necessary. If you are running Red Hat Linux 4 0 like I am, during the installation process you are allowed to select whether or not you want to install a web server If you do, Red Hat 4 0 includes the latest Apache and installs everything automatically with a default configuration This default configuration even RUNS correctly without any modifications However, even in this case, please read my notes and preferences regarding installation in the next section. Typically, unless you need to add special modules or features, the binary distribution or the default Red Hat installation should be fine However, let s say you wanted to run Apache as a proxy server In this case, you would need the source so you can compile the proxy module as part of the binary. Note I have heard rumors that the binary included with Red Hat 4 0 has some bugs I have yet to encounter any myself, so take that rumor with a big grain of salt. I m not going to cover compiling Apache since it s actually a fairly painless process and pretty well documented Given that, let s move on to actual installation. Personally, I like to group all the web server files together in a centralized location If you are installing this manually, then this is something you can do from the outset, and I highly suggest doing this since it will reduce administration headaches. If you had Apache installed automatically as part of the Red Hat installation procedure, then things will NOT be centralized In fact, I thought the file placement scheme was one of the most confusing I ve ever encountered Here s what the Red Hat installation does. web server binaries. I found this to be really disorganized, so I ended up putting mostly everything under one directory I left the binaries in usr sbin. You should end up with. And then to preserve the original Redhat file locations. Finally, I added this link since I felt that it made more sense. If you are installing and compiling Apache manually, you may want to have the original source files also located under or whichever directory you have. Apache has three main configuration files and If you are running Red Hat 4 0, these files will already be set with the correct directory paths If you centralized the locations of all these files, but made those symbolic links as I mentioned above, things will still be fine since the symbolic links preserves where Red Hat installed everything. If you are doing a generic installation or have some other setup, then you will need to do the following. In change update these directory entries. Essentially, these are the necessary directives in the config files that need to be updated with the new centralized organization. For further configuration options, I will have to give the standard statement, Please refer to the docs. Starting Running the Web Server. To make a long story short, you simply to need to execute the binary Typically, this is done when the system starts up, in one of the rc files. In Red Hat 4 0, it has more of a System V ish startup style In etc rc d init d resides which is the script used to start and stop You can also execute this by hand if you find the need. For other systems or a manual install , I suggest starting after most other services have started i e put it in A simple line such as. Obviously, it must start after tcp ip networking has been started. Needless to say, I didn t cover actual configuration options and how to manage your web server The configuration options I leave to the Apache manual Managing the web server itself depends on what kind of web site you want to run My own system does not run a real web site in other words, I don t advertise it for anything because it serves no real purpose other than for my own experimentation However, you are more than welcome to take a look at it since it does have a bunch of Linux related links to it The URL can be found at the end of this article. Other than that, I would love to hear any comments and or criticisms you may have about what I wrote Originally, my plan was to write a monthly article about running managing a web server under Linux However, short of actually writing a manual on configuring Apache which the Apache documentation is good enough as a reference , I don t know what else to write about since there may not be all that much to write about. However, one idea for a monthly thing that might be good is to collect hints, tricks, and other useful information related to running a web server under Linux Think of it more as a 2 cent tips for a linux web server If anyone is interested in this, please drop me a note. Copyright 1996, Andy Kahn Published in Issue 12 of the Linux Gazette. This document explains how to connect Tomcat to the popular open source web server, Apache There is actually two version of Apache, 1 3 and 2 0 and both can be used with modjk, the Tomcat redirector module. It is recommanded that you also read the Workers HowTo document to learn how to setup the working entities between your WebServer and Tomcat Engines. This document was originally part of Tomcat A Minimalistic User s Guide written by Gal Shachor, but has been split off for organizational reasons. Document Conventions and Assumptions. is the root directory of tomcat Your Tomcat installation should have the following subdirectories. conf - Where you can place various configuration files. webapps - Containing example applications. bin - Where you place web server plugins. In all the examples in this document will be var tomcat3 A worker is defined to be a tomcat process that accepts work from the Apache server. The modjk module was developed and tested on. Linux, FreeBSD, AIX, HP-UX, MacOS X, and should works on major Unixes platforms supporting Apache 1 3 and or 2 0.WinNT4 0-i386 SP4 SP5 SP6a should be able to work with other service packs , Win2K and WinXP and Win98.Cygwin until you have an apache server and autoconf automake support tools. iSeries V5R1 and V5R2 with Apache 2 0 39 Be sure to have the latest Apache PTF installed. Tomcat 3 2 x, Tomcat 3 3 x, Tomcat 4 0 x, Tomcat 4 1 x and Tomcat 5.The redirector uses ajp12 and ajp13 to send requests to the Tomcat containers There is also an option to use Tomcat in process, more about the in-process mode can be found in the in process howto. Who support ajp protocols. The ajp12 protocol is only available in Tomcat 3 2 x and 3 3 x. The ajp12 has been deprecated with Tomcat 3 3 x and you should use instead ajp13 which is the only ajp protocol known by Tomcat 4 0 x, 4 1 x and 5.Of course Tomcat 3 2 x and 3 3 x also support ajp13 protocol. Others servlet engines such as jetty have support for ajp13 protocol. How does it work. In a nutshell a web server is waiting for client requests When these requests arrive the server does whatever is needed to serve the requests by providing the necessary content. Adding a servlet container may somewhat change this behavior Now the web server needs also to perform the following. Load the servlet container adapter library and initialize it prior to serving requests. When a request arrives, it needs to check and see if a certain request belongs to a servlet, if so it needs to let the adapter take the request and handle it. The adapter on the other hand needs to know what requests it is going to serve, usually based on some pattern in the request URL, and to where to direct these requests. Things are even more complex when the user wants to set a configuration that uses virtual hosts, or when they want multiple developers to work on the same web server but on different servlet container JVMs We will cover these two cases in the advanced sections. modjk can be obtained in two formats - binary and source Depending on the platform you are running your web server on, a binary version of modjk may be available. It is recommended to use the binary version if one is available If the binary is not available, follow the instructions for building modjk from source The modjk source can be downloaded from a mirror here. The binaries for modjk are now available, for several platforms, in a separate area as the Tomcat Binary Release The binaries are located in subdirectories by platform. For some platforms, such as Windows, this is the typical way of obtaining modjk since most Windows systems do not have C compilers. For others, the binary distribution of modjk offers simpler installation. For example JK 1 2 5 can be downloaded from a mirror here and contains binary version for a variety of operating systems for both Apache 1 3 and Apache 2.modjk requires two entities. - The Apache module, depending on your operating system, it will be modjk, nlm or or see the build section. - A file that describes the host s and port s used by the workers Tomcat processes A sample can be found under the conf directory. Also as with other Apache modules, modjk should be first installed on the modules directory of your Apache webserver, ie usr lib apache and you should update your file. Disabling old modjserv. If you ve previously configured Apache to use modjserv remove any ApJServMount directives from your. If you re including or you ll want to remove them as well - they are specific to modjserv. The modjserv configuration directives are not compatible with modjk. Using Tomcat auto-configure. The simplest way to configure Apache to use modjk is to turn on the Apache auto-configure setting in Tomcat and put the following include directive at the end of your Apache file make sure you replace TOMCATHOME with the correct path for your Tomcat installation. To be added at the end of your. This will tell Apache to use directives in the file in the Apache configuration This file is created by enabling the Apache auto-configuration as described in the Tomcat documentation. Custom modjk configuration. You should use custom configuration when. You couldn t use since Tomcat engine isn t on the same machine that your Apache WebServer, ie when you have an Apache in front of a Tomcat Farm. Another case for custom configuration is when your Apache is in front of many differents Tomcat engines, each one having it s own configuration, a general case in ISP hosting. Also all Apache webmaster will retain custom configuration to be able to tune the settings to their real needs. Simple configuration example. Here is a simple configuration. Load modjk module. LoadModule jkmodule. Declare the module for IfModule directive. Where to find. Where to put jk logs. Set the jk log level debug error info. Select the log format. JkLogStampFormat a b d H M S Y. JkOptions indicate to send SSL KEY SIZE. JkOptions ForwardKeySize ForwardURICompat - ForwardDirectories. JkRequestLogFormat set the request format. JkRequestLogFormat w V T. Send servlet for context examples to worker named worker1.JkMount examples servlet worker1. Send JSPs for context examples to worker named worker1.JkMount worker1.JkOptions ForwardDirectories is used in conjunction with DirectoryIndex directive of Apache web server As such moddir should be available to Apache, statically or dynamically DSO. When DirectoryIndex is configured, Apache will create sub-requests for each of the local-url s specified in the directive, to determine if there is a local file that matches this is done by stat-ing the file. If ForwardDirectories is set to false default and Apache doesn t find any files that match, Apache will serve the content of the directory if directive Options specifies Indexes for that directory or a 403 Forbidden response if directive Options doesn t specify Indexes for that directory. If ForwarDirectories is set to true and Apache doesn t find any files that match, the request will be forwarded to Tomcat for resolution This is used in cases when Apache cannot see the index files on the file system for various reasons Tomcat is running on a different machine, the JSP file has been precompiled etc. Note that locally visible files will take precedence over the ones visible only to Tomcat i e if Apache can see the file, that s the one that s going to get served This is important if there is more then one type of file that Tomcat normally serves - for instance Velocity pages and JSP pages. The directive JkEnvVar allow you to forward an environment vars from Apache server to Tomcat engine. Assigning URLs to Tomcat. If you have created a custom or local version of as noted above, you can change settings such as the workers or URL prefix. JkMount directive assign specific URLs to Tomcat In general the structure of a JkMount directive is. send all requests ending in to worker1.JkMount worker1. send all requests ending servlet to worker1.JkMount servlet worker1. send all requests jsp requests to files located in otherworker will go worker2.JkMount worker2.You can use the JkMount directive at the top level or inside VirtualHost sections of your file. Configuring Apache to serve static web application files. If the Tomcat Host appBase webapps directory is accessible by the Apache web server, Apache can be configured to serve web application context directory static files instead of passing the request to Tomcat. Caution If Apache is configured to serve static pages for a web application it bypasses any security contraints you may have configured in your web application config file. Use Apache s Alias directive to map a single web application context directory into Apache s document space for a VirtualHost. Static files in the examples webapp are served by apache. Alias examples vat tomcat3 webapps examples. The following line prohibits users from directly access WEB-INF. Location examples WEB-INF AllowOverride None deny from all Location. All JSP will goes to worker1.JkMount worker1. All servlets goes to worker1.JkMount servlet worker1.Starting with modjk 1 2 6, and under Apache 2 0, it s possible to exclude some URL URI from jk processing by setting the env var no-jk for example with the SetEnvIf Directive. You could use no-jk env var to fix problem with modalias or moduserdir directive when jk and alias userdir URLs matches. All URL goes to tomcat except the one containing home. VirtualHost 80 ServerName DocumentRoot www testxxx htdocs. Use SetEnvIf to st no-jk when home is encountered. SetEnvIf RequestURI home no-jk. Now home will goes to home dataxxx. Alias home home dataxxx Directory home dataxxx Options Indexes MultiViews AllowOverride None Order allow, deny Allow from all Directory JkMount myssys-xxx VirtualHost. Use the modjk JkAutoAlias directive to map all web application context directories into Apache s document space. Attempts to access the WEB-INF or META-INF directories within a web application context or a Web Archive within the Tomcat Host appBase webapps directory will fail with an 403, Access Forbidden. Static files in all Tomcat webapp context directories are served by apache. JkAutoAlias var tomcat3 webapps JkMount ajp13 JkMount servlet ajp13.Building modjk for Apache on Windows NT 2K XP. The module was developed using Visual C version 6 0, so having this environment is a prerequisite if you want to perform a custom build. The steps that you need to take are. Change directory to the apache 1 3 or apache 2 0 source directory depending on your version of Apache. If you want to build modjk for Apache 1 3, set an APACHE1HOME environment variable which points to where your Apache 1 3 is installed A modjk module for Apache 2 0 build will require APACHE2HOME environment variable to be set. Copy to Apache s modules directory. An example on how to build modjk for Apache 1 3.Set location for Apache 1 3 sources. Change directory to the modjk module for Apache 1 3.Build the sources using MSDEV. Copy the dll to your apache modules directory. c cp c apache13 modules. An example on how to build modjk for Apache 2 0.Set location for Apache 2 0 sources. Change directory to the modjk module for Apache 2 0.Build the sources using MSDEV. Copy the dll to your apache modules directory. c cp c apache20 modules. If msdev is not in your path, enter the full path to Also, is expected to exist in the src CoreD and src CoreR directories before linking will succeed You will need to build enough of the Apache source to create these libraries This will build both release and debug versions of the redirector plug-in modjk An alternative will be to open in msdev and build it using the build menu. Building modjk for Apache on iSeries OS400.Since OS400 V4R5, iSeries AS 400 has used Apache 2 0 as their primary web server, replacing the old IBM webserver It s now possible to build modjk on iSeries thanks to the help of the IBM Rochester Labs which has provided information and patches to adapt modjk to OS400.You should have at least Apache 2 0 39, a C Compiler and IFS Apache 2 0 39 is provided with the most recent set of PTFs for the iSeries Apache server, which can be found at. To configure modjk on iSeries use the CL source provided with the modjk source. Get the latest modjk source and untar it on a Windows or Unix boxes. Create a directory in IFS, ie home apache. Send the whole jk source directory to iSeries directory via FTP. Then go to the iSeries command line. Create modjk library. CRTLIB MODJK TEXT Apache modjk tomcat connector module. Create service program source file. CRTSRCPF MODJK QSRVSRC TEXT Service program source file. Create the CL build program source file. CRTSRCPF FILE MODJK QCLSRC TEXT Build program source file. Edit the service program source file. STRSEU MODJK QSRVSRC MODJK. In the edited file, specify that only jkmodule should be exported. Getting modjk linked statically with Apache. modjk allows to install modjk in the Apache source tree to get a statically linked modjk Having modjk in the executable brings some performance improvements The configure option --with-apache prepare modjk to install it in the Apache source tree The option --with-apache works both for Apache-1 3 and Apache-2 0 The examples below show how to get modjk in the process. Installation in Apache-2 0. is the directory where the sources are located. configure user host. Install the modjk library and other files in. It is not possible to configure Apache directly because the config m4 of modjk must be added to the configure of. cd user host. The enable-jk share and enable-jk static are not supported --with-modjk only allow static linking of modjk. Installation in Apache-1 3. home apache apache1 3 27 is the directory where the apache-1 3 sources are located. configure --with-apache home apache apache1 3 27 user host. Install the libjk library, modjk c, includes and other files in home apache apache1 3 27 src modules jk. Configure in the Apache sources. cd home apache apache1 3 27 user host. configure --enable-module dir --disable-shared dir --activate-module src modules jk libjk a --disable-shared jk user host. The --enable-shared jk is also working and builds a dso file. Just change the configure in the Apache sources. configure --enable-module dir --enable-shared dir --activate-module src modules jk libjk a --enable-shared jk.

Comments

Popular posts from this blog

Aktienoptionen Nach Fusion

Best Forex Handel Demo Konto

Forex Materijal Cijena