Apache HTTP Server Archlinux - mod_jk - Apache Tomcat Kommunikation
Der Apache HTTP Server ist ein Open Source Webserver und der seit 1996 am meisten im Internet eingesetzte Webserver weltweit. Der freie und quell offenen Webserver wird von der Apache Software Foundation zur Verfügung gestellt und weiterentwickelt.
Um den Apache HTTP Server als z.B. Frontend-Server vor eines Apache Tomcat Server zu betreiben, kann als Kommunikationsprotokoll das AJP/1.3-Protokoll zum Einsatz kommen.
Hierbei gibt es zwei Module, die die Kommunikation zwischen dem Apache HTTP Server und dem Apache Tomcat Server über das AJP/1.3 -Protokoll bewerkstelligen können:
Nachfolgend soll der Einsatz des Moduls - mod_jk
beschrieben werden.
Ab hier werden root
-Rechte zur Ausführung der nachfolgenden Befehle benötigt. Um root
zu werden geben Sie bitte folgenden Befehl ein:
$ su -
Password:
Vorbereitung
Zur Installation von The Apache Tomcat Connectors: mod_jk als AUR
-Paket, müssen nachfolgende Vorbereitungen durchgeführt werden:
Die Einbindung des AUR
-Repositories, kann wie in nachfolgenden internen Link beschrieben
durchgeführt werden.
Installation: mod_jk
Nachdem das AUR
-Repository von ArchLinux - AUR
erfolgreich eingebunden wurde, kann mit nachfolgendem Befehl, das AUR
-Paket - mod_jk
installiert werden:
# pikaur --noconfirm -S mod_jk
Installationsverlauf
# pikaur --noconfirm -S mod_jk# pikaur --noconfirm -S mod_jk
Reading repository package databases...
Reading local package database...
Resolving AUR dependencies...
looking for conflicting AUR packages...
Not showing diff for mod_jk package (--noconfirm)
:: Skipping review of PKGBUILD for mod_jk package (--noconfirm)
Reading local package database...
:: Installing repository dependencies for mod_jk:
:: There are 4 providers available for java-environment:
:: Repository extra
1) jdk-openjdk 2) jdk11-openjdk 3) jdk17-openjdk 4) jdk8-openjdk
Enter a number (default=1):
resolving dependencies...
looking for conflicting packages...
Package (5) New Version Net Change Download Size
extra/hicolor-icon-theme 0.17-3 0.05 MiB 0.01 MiB
extra/java-environment-common 3-5 0.00 MiB 0.00 MiB
extra/jre-openjdk 20.0.2.u9-3 0.48 MiB 0.18 MiB
extra/jre-openjdk-headless 20.0.2.u9-3 187.73 MiB 39.84 MiB
extra/jdk-openjdk 20.0.2.u9-3 295.14 MiB 276.80 MiB
Total Download Size: 316.83 MiB
Total Installed Size: 483.41 MiB
:: Proceed with installation? [Y/n]
:: Retrieving packages...
jdk-openjdk-20.0... 276.8 MiB 236 MiB/s 00:01 [######################] 100%
jre-openjdk-head... 39.8 MiB 199 MiB/s 00:00 [######################] 100%
jre-openjdk-20.0... 183.7 KiB 179 MiB/s 00:00 [######################] 100%
hicolor-icon-the... 9.8 KiB 3.19 MiB/s 00:00 [######################] 100%
java-environment... 2.6 KiB 855 KiB/s 00:00 [######################] 100%
Total (5/5) 316.8 MiB 227 MiB/s 00:01 [######################] 100%
(5/5) checking keys in keyring [######################] 100%
(5/5) checking package integrity [######################] 100%
(5/5) loading package files [######################] 100%
(5/5) checking for file conflicts [######################] 100%
(5/5) checking available disk space [######################] 100%
:: Running pre-transaction hooks...
(1/1) Performing snapper pre snapshots for the following configurations...
==> root: 10
:: Processing package changes...
(1/5) installing jre-openjdk-headless [######################] 100%
Default Java environment is already set to 'java-11-openjdk'
See 'archlinux-java help' to change it
Optional dependencies for jre-openjdk-headless
java-rhino: for some JavaScript support
(2/5) installing jre-openjdk [######################] 100%
Default Java environment is already set to 'java-11-openjdk'
See 'archlinux-java help' to change it
when you use a non-reparenting window manager,
set _JAVA_AWT_WM_NONREPARENTING=1 in /etc/profile.d/jre.sh
Optional dependencies for jre-openjdk
alsa-lib: for basic sound support
gtk2: for the Gtk+ 2 look and feel - desktop usage
gtk3: for the Gtk+ 3 look and feel - desktop usage
(3/5) installing java-environment-common [######################] 100%
(4/5) installing hicolor-icon-theme [######################] 100%
(5/5) installing jdk-openjdk [######################] 100%
Default Java environment is already set to 'java-11-openjdk'
See 'archlinux-java help' to change it
:: Running post-transaction hooks...
(1/2) Arming ConditionNeedsUpdate...
(2/2) Performing snapper post snapshots for the following configurations...
==> root: 11
Reading local package database...
:: Starting the build:
Running as unit: run-u653.service
Press ^] three times within 1s to disconnect TTY.
==> Making package: mod_jk 1.2.48-1 (Wed 06 Sep 2023 03:32:48 PM CEST)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
-> Downloading tomcat-connectors-1.2.48-src.tar.gz...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 3579k 100 3579k 0 0 1010k 0 0:00:03 0:00:03 --:--:-- 1010k
==> Validating source files with sha1sums...
tomcat-connectors-1.2.48-src.tar.gz ... Passed
==> Validating source files with sha512sums...
tomcat-connectors-1.2.48-src.tar.gz ... Passed
==> Extracting sources...
-> Extracting tomcat-connectors-1.2.48-src.tar.gz with bsdtar
==> Entering fakeroot environment...
==> Starting package()...
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for test... /usr/bin/test
checking for grep... /usr/bin/grep
checking for echo... /usr/bin/echo
checking for sed... /usr/bin/sed
checking for cp... /usr/bin/cp
checking for mkdir... /usr/bin/mkdir
need to check for Perl first, apxs depends on it...
checking for perl... /usr/bin/perl
APRINCLUDEDIR is -I/usr/include/apr-1 -I/usr/include/apr-1
building connector for "apache-2.0"
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking for style of include used by make... GNU
checking dependency style of gcc... none
checking for a sed that does not truncate output... (cached) /usr/bin/sed
checking for grep that handles long lines and -e... (cached) /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking how to print strings... printf
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for mt... no
checking if : is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for shl_load... no
checking for shl_load in -ldld... no
checking for dlopen... yes
checking whether a program can dlopen itself... yes
checking whether a statically linked program can dlopen itself... no
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
LIBTOOL="/usr/share/apr-1/build/libtool --silent"
checking size of char... 1
checking size of int... 4
checking size of long... 8
checking size of short... 2
checking size of long double... 16
checking size of long long... 8
checking size of longlong... 0
checking size of pid_t... 4
checking size of pthread_t... 8
checking for snprintf... yes
checking for vsnprintf... yes
checking for flock... yes
checking for setsockopt in -lsocket... no
checking sys/filio.h usability... no
checking sys/filio.h presence... no
checking for sys/filio.h... no
checking whether to use SO_RCVTIMEO with setsockopt()... yes
checking whether to use SO_SNDTIMEO with setsockopt()... yes
checking whether to use SOCK_CLOEXEC with socket()... yes
checking poll.h usability... yes
checking poll.h presence... yes
checking for poll.h... yes
checking for poll... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking for IPv6 with socket()... yes
checking for struct sockaddr_storage... yes
checking for getaddrinfo... yes
checking for gethostbyname_r... yes
checking whether the compiler provides atomic builtins... yes
checking for target platform... unix
no apache given
no netscape given
configure: tokens in APXSLDFLAGS have been prefixed with '-Wl,'
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating apache-2.0/Makefile
config.status: creating apache-2.0/Makefile.apxs
config.status: creating common/Makefile
config.status: creating common/list.mk
config.status: creating common/jk_types.h
config.status: creating common/config.h
config.status: executing depfiles commands
config.status: executing libtool commands
Making all in common
make[1]: Entering directory '/var/cache/private/pikaur/build/mod_jk/src/tomcat-connectors-1.2.48-src/native/common'
/usr/share/apr-1/build/libtool --silent --mode=compile gcc -I. -I/usr/include/httpd -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -DHAVE_CONFIG_H -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/build/apache/src=/usr/src/debug/apache -flto=auto -DHAVE_APR -I/usr/include/apr-1 -I/usr/include/apr-1 -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -c jk_ajp12_worker.c -o jk_ajp12_worker.lo
/usr/share/apr-1/build/libtool --silent --mode=compile gcc -I. -I/usr/include/httpd -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -DHAVE_CONFIG_H -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/build/apache/src=/usr/src/debug/apache -flto=auto -DHAVE_APR -I/usr/include/apr-1 -I/usr/include/apr-1 -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -c jk_connect.c -o jk_connect.lo
/usr/share/apr-1/build/libtool --silent --mode=compile gcc -I. -I/usr/include/httpd -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -DHAVE_CONFIG_H -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/build/apache/src=/usr/src/debug/apache -flto=auto -DHAVE_APR -I/usr/include/apr-1 -I/usr/include/apr-1 -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -c jk_msg_buff.c -o jk_msg_buff.lo
/usr/share/apr-1/build/libtool --silent --mode=compile gcc -I. -I/usr/include/httpd -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -DHAVE_CONFIG_H -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/build/apache/src=/usr/src/debug/apache -flto=auto -DHAVE_APR -I/usr/include/apr-1 -I/usr/include/apr-1 -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -c jk_util.c -o jk_util.lo
/usr/share/apr-1/build/libtool --silent --mode=compile gcc -I. -I/usr/include/httpd -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -DHAVE_CONFIG_H -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/build/apache/src=/usr/src/debug/apache -flto=auto -DHAVE_APR -I/usr/include/apr-1 -I/usr/include/apr-1 -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -c jk_ajp13.c -o jk_ajp13.lo
/usr/share/apr-1/build/libtool --silent --mode=compile gcc -I. -I/usr/include/httpd -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -DHAVE_CONFIG_H -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/build/apache/src=/usr/src/debug/apache -flto=auto -DHAVE_APR -I/usr/include/apr-1 -I/usr/include/apr-1 -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -c jk_pool.c -o jk_pool.lo
/usr/share/apr-1/build/libtool --silent --mode=compile gcc -I. -I/usr/include/httpd -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -DHAVE_CONFIG_H -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/build/apache/src=/usr/src/debug/apache -flto=auto -DHAVE_APR -I/usr/include/apr-1 -I/usr/include/apr-1 -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -c jk_worker.c -o jk_worker.lo
/usr/share/apr-1/build/libtool --silent --mode=compile gcc -I. -I/usr/include/httpd -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -DHAVE_CONFIG_H -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/build/apache/src=/usr/src/debug/apache -flto=auto -DHAVE_APR -I/usr/include/apr-1 -I/usr/include/apr-1 -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -c jk_ajp13_worker.c -o jk_ajp13_worker.lo
/usr/share/apr-1/build/libtool --silent --mode=compile gcc -I. -I/usr/include/httpd -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -DHAVE_CONFIG_H -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/build/apache/src=/usr/src/debug/apache -flto=auto -DHAVE_APR -I/usr/include/apr-1 -I/usr/include/apr-1 -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -c jk_lb_worker.c -o jk_lb_worker.lo
/usr/share/apr-1/build/libtool --silent --mode=compile gcc -I. -I/usr/include/httpd -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -DHAVE_CONFIG_H -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/build/apache/src=/usr/src/debug/apache -flto=auto -DHAVE_APR -I/usr/include/apr-1 -I/usr/include/apr-1 -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -c jk_sockbuf.c -o jk_sockbuf.lo
/usr/share/apr-1/build/libtool --silent --mode=compile gcc -I. -I/usr/include/httpd -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -DHAVE_CONFIG_H -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/build/apache/src=/usr/src/debug/apache -flto=auto -DHAVE_APR -I/usr/include/apr-1 -I/usr/include/apr-1 -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -c jk_map.c -o jk_map.lo
/usr/share/apr-1/build/libtool --silent --mode=compile gcc -I. -I/usr/include/httpd -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -DHAVE_CONFIG_H -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/build/apache/src=/usr/src/debug/apache -flto=auto -DHAVE_APR -I/usr/include/apr-1 -I/usr/include/apr-1 -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -c jk_uri_worker_map.c -o jk_uri_worker_map.lo
/usr/share/apr-1/build/libtool --silent --mode=compile gcc -I. -I/usr/include/httpd -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -DHAVE_CONFIG_H -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/build/apache/src=/usr/src/debug/apache -flto=auto -DHAVE_APR -I/usr/include/apr-1 -I/usr/include/apr-1 -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -c jk_ajp14.c -o jk_ajp14.lo
/usr/share/apr-1/build/libtool --silent --mode=compile gcc -I. -I/usr/include/httpd -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -DHAVE_CONFIG_H -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/build/apache/src=/usr/src/debug/apache -flto=auto -DHAVE_APR -I/usr/include/apr-1 -I/usr/include/apr-1 -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -c jk_ajp14_worker.c -o jk_ajp14_worker.lo
/usr/share/apr-1/build/libtool --silent --mode=compile gcc -I. -I/usr/include/httpd -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -DHAVE_CONFIG_H -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/build/apache/src=/usr/src/debug/apache -flto=auto -DHAVE_APR -I/usr/include/apr-1 -I/usr/include/apr-1 -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -c jk_md5.c -o jk_md5.lo
/usr/share/apr-1/build/libtool --silent --mode=compile gcc -I. -I/usr/include/httpd -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -DHAVE_CONFIG_H -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/build/apache/src=/usr/src/debug/apache -flto=auto -DHAVE_APR -I/usr/include/apr-1 -I/usr/include/apr-1 -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -c jk_shm.c -o jk_shm.lo
/usr/share/apr-1/build/libtool --silent --mode=compile gcc -I. -I/usr/include/httpd -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -DHAVE_CONFIG_H -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/build/apache/src=/usr/src/debug/apache -flto=auto -DHAVE_APR -I/usr/include/apr-1 -I/usr/include/apr-1 -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -c jk_ajp_common.c -o jk_ajp_common.lo
/usr/share/apr-1/build/libtool --silent --mode=compile gcc -I. -I/usr/include/httpd -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -DHAVE_CONFIG_H -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/build/apache/src=/usr/src/debug/apache -flto=auto -DHAVE_APR -I/usr/include/apr-1 -I/usr/include/apr-1 -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -c jk_context.c -o jk_context.lo
/usr/share/apr-1/build/libtool --silent --mode=compile gcc -I. -I/usr/include/httpd -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -DHAVE_CONFIG_H -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/build/apache/src=/usr/src/debug/apache -flto=auto -DHAVE_APR -I/usr/include/apr-1 -I/usr/include/apr-1 -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -c jk_url.c -o jk_url.lo
/usr/share/apr-1/build/libtool --silent --mode=compile gcc -I. -I/usr/include/httpd -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -DHAVE_CONFIG_H -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/build/apache/src=/usr/src/debug/apache -flto=auto -DHAVE_APR -I/usr/include/apr-1 -I/usr/include/apr-1 -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -c jk_status.c -o jk_status.lo
make[1]: Leaving directory '/var/cache/private/pikaur/build/mod_jk/src/tomcat-connectors-1.2.48-src/native/common'
Making all in apache-2.0
make[1]: Entering directory '/var/cache/private/pikaur/build/mod_jk/src/tomcat-connectors-1.2.48-src/native/apache-2.0'
/usr/share/apr-1/build/libtool --silent --mode=compile gcc -I/usr/include/httpd -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -DHAVE_CONFIG_H -DUSE_APACHE_MD5 -I../common -I ../common -DLINUX -D_REENTRANT -D_GNU_SOURCE -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/build/apache/src=/usr/src/debug/apache -flto=auto -DHAVE_APR -I/usr/include/apr-1 -I/usr/include/apr-1 -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -c mod_jk.c -o mod_jk.lo
/usr/share/apr-1/build/libtool --silent --mode=link gcc -I/usr/include/httpd -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -DHAVE_CONFIG_H -DUSE_APACHE_MD5 -I../common -I ../common -DLINUX -D_REENTRANT -D_GNU_SOURCE -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/build/apache/src=/usr/src/debug/apache -flto=auto -DHAVE_APR -I/usr/include/apr-1 -I/usr/include/apr-1 -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -Wl,-flto=auto -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -o mod_jk.la -module -rpath /usr/lib/httpd/modules -avoid-version mod_jk.lo ../common/jk_ajp12_worker.lo ../common/jk_connect.lo ../common/jk_msg_buff.lo ../common/jk_util.lo ../common/jk_ajp13.lo ../common/jk_pool.lo ../common/jk_worker.lo ../common/jk_ajp13_worker.lo ../common/jk_lb_worker.lo ../common/jk_sockbuf.lo ../common/jk_map.lo ../common/jk_uri_worker_map.lo ../common/jk_ajp14.lo ../common/jk_ajp14_worker.lo ../common/jk_md5.lo ../common/jk_shm.lo ../common/jk_ajp_common.lo ../common/jk_context.lo ../common/jk_url.lo ../common/jk_status.lo
../scripts/build/instdso.sh SH_LIBTOOL='/usr/share/apr-1/build/libtool --silent' mod_jk.la `pwd`
/usr/share/apr-1/build/libtool --silent --mode=install cp mod_jk.la /var/cache/private/pikaur/build/mod_jk/src/tomcat-connectors-1.2.48-src/native/apache-2.0/
libtool: warning: remember to run 'libtool --finish /usr/lib/httpd/modules'
make[1]: Leaving directory '/var/cache/private/pikaur/build/mod_jk/src/tomcat-connectors-1.2.48-src/native/apache-2.0'
make[1]: Entering directory '/var/cache/private/pikaur/build/mod_jk/src/tomcat-connectors-1.2.48-src/native'
make[1]: Nothing to be done for 'all-am'.
make[1]: Leaving directory '/var/cache/private/pikaur/build/mod_jk/src/tomcat-connectors-1.2.48-src/native'
target="all"; \
list='common apache-2.0'; \
for i in $list; do \
echo "Making $target in $i"; \
if test "$i" != "."; then \
(cd $i && make $target) || exit 1; \
fi; \
done;
Making all in common
make[1]: Entering directory '/var/cache/private/pikaur/build/mod_jk/src/tomcat-connectors-1.2.48-src/native/common'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/var/cache/private/pikaur/build/mod_jk/src/tomcat-connectors-1.2.48-src/native/common'
Making all in apache-2.0
make[1]: Entering directory '/var/cache/private/pikaur/build/mod_jk/src/tomcat-connectors-1.2.48-src/native/apache-2.0'
../scripts/build/instdso.sh SH_LIBTOOL='/usr/share/apr-1/build/libtool --silent' mod_jk.la `pwd`
/usr/share/apr-1/build/libtool --silent --mode=install cp mod_jk.la /var/cache/private/pikaur/build/mod_jk/src/tomcat-connectors-1.2.48-src/native/apache-2.0/
libtool: warning: remember to run 'libtool --finish /usr/lib/httpd/modules'
make[1]: Leaving directory '/var/cache/private/pikaur/build/mod_jk/src/tomcat-connectors-1.2.48-src/native/apache-2.0'
==> Tidying install...
-> Removing libtool files...
-> Purging unwanted files...
-> Removing static library files...
-> Stripping unneeded symbols from binaries and libraries...
-> Compressing man and info pages...
==> Checking for packaging issues...
==> Creating package "mod_jk"...
-> Generating .PKGINFO file...
-> Generating .BUILDINFO file...
-> Generating .MTREE file...
-> Compressing package...
==> Leaving fakeroot environment.
==> Finished making: mod_jk 1.2.48-1 (Wed 06 Sep 2023 03:33:05 PM CEST)
Finished with result: success
Main processes terminated with: code=exited/status=0
Service runtime: 17.955s
CPU time consumed: 17.974s
:: Removing already installed dependencies for mod_jk:
checking dependencies...
:: libjpeg-turbo optionally requires java-runtime>11: for TurboJPEG Java wrapper
Package (5) Old Version Net Change
hicolor-icon-theme 0.17-3 -0.05 MiB
java-environment-common 3-5 0.00 MiB
jdk-openjdk 20.0.2.u9-3 -295.14 MiB
jre-openjdk 20.0.2.u9-3 -0.48 MiB
jre-openjdk-headless 20.0.2.u9-3 -187.73 MiB
Total Removed Size: 483.41 MiB
:: Do you want to remove these packages? [Y/n]
:: Running pre-transaction hooks...
(1/1) Performing snapper pre snapshots for the following configurations...
==> root: 12
:: Processing package changes...
(1/5) removing jdk-openjdk [######################] 100%
(2/5) removing jre-openjdk [######################] 100%
(3/5) removing jre-openjdk-headless [######################] 100%
(4/5) removing java-environment-common [######################] 100%
(5/5) removing hicolor-icon-theme [######################] 100%
:: Running post-transaction hooks...
(1/2) Arming ConditionNeedsUpdate...
(2/2) Performing snapper post snapshots for the following configurations...
==> root: 13
loading packages...
resolving dependencies...
:: There are 4 providers available for java-environment:
:: Repository extra
1) jdk-openjdk 2) jdk11-openjdk 3) jdk17-openjdk 4) jdk8-openjdk
Enter a number (default=1):
looking for conflicting packages...
Package (6) New Version Net Change
extra/hicolor-icon-theme 0.17-3 0.05 MiB
extra/java-environment-common 3-5 0.00 MiB
extra/jdk-openjdk 20.0.2.u9-3 295.14 MiB
extra/jre-openjdk 20.0.2.u9-3 0.48 MiB
extra/jre-openjdk-headless 20.0.2.u9-3 187.73 MiB
mod_jk 1.2.48-1 0.42 MiB
Total Installed Size: 483.83 MiB
:: Proceed with installation? [Y/n]
(6/6) checking keys in keyring [######################] 100%
(5/6) checking package integrity [######################] 100%
(5/6) loading package files [######################] 100%
(6/6) checking for file conflicts [######################] 100%
(6/6) checking available disk space [######################] 100%
:: Running pre-transaction hooks...
(1/1) Performing snapper pre snapshots for the following configurations...
==> root: 14
:: Processing package changes...
(1/6) installing jre-openjdk-headless [######################] 100%
Default Java environment is already set to 'java-11-openjdk'
See 'archlinux-java help' to change it
Optional dependencies for jre-openjdk-headless
java-rhino: for some JavaScript support
(2/6) installing jre-openjdk [######################] 100%
Default Java environment is already set to 'java-11-openjdk'
See 'archlinux-java help' to change it
when you use a non-reparenting window manager,
set _JAVA_AWT_WM_NONREPARENTING=1 in /etc/profile.d/jre.sh
Optional dependencies for jre-openjdk
alsa-lib: for basic sound support
gtk2: for the Gtk+ 2 look and feel - desktop usage
gtk3: for the Gtk+ 3 look and feel - desktop usage
(3/6) installing java-environment-common [######################] 100%
(4/6) installing hicolor-icon-theme [######################] 100%
(5/6) installing jdk-openjdk [######################] 100%
Default Java environment is already set to 'java-11-openjdk'
See 'archlinux-java help' to change it
(6/6) installing mod_jk [######################] 100%
:: Running post-transaction hooks...
(1/2) Arming ConditionNeedsUpdate...
(2/2) Performing snapper post snapshots for the following configurations...
==> root: 15
Mit nachfolgendem Befehl kann überprüft werden, welche Inhalte mit den Paket mod_jk
installiert wurden:
# pikaur -Qil mod_jk
Installierte Dateien
# pikaur -Qil mod_jk
Name : mod_jk
Version : 1.2.48-1
Description : The Apache Tomcat Connector
Architecture : x86_64
URL : https://tomcat.apache.org/connectors-doc/
Licenses : Apache
Groups : None
Provides : None
Depends On : java-environment apache
Optional Deps : None
Required By : None
Optional For : None
Conflicts With : None
Replaces : None
Installed Size : 432.26 KiB
Packager : Unknown Packager
Build Date : Wed 06 Sep 2023 03:32:47 PM CEST
Install Date : Wed 06 Sep 2023 03:33:09 PM CEST
Install Reason : Explicitly installed
Install Script : No
Validated By : None
mod_jk /usr/
mod_jk /usr/lib/
mod_jk /usr/lib/httpd/
mod_jk /usr/lib/httpd/modules/
mod_jk /usr/lib/httpd/modules/mod_jk.so
Konfiguration: Apache HTTPD Webserver
/etc/httpd/conf/httpd.conf
Die Konfigurationsdatei /etc/httpd/conf/httpd.conf
beinhaltet die Aktivierung der Module des Apache HTTP Server .
HINWEIS - Die nachfolgenden Anpassungen ist individuell und vom jeweiligen Einsatzzweck abhängig und ggf. den persönlichen Bedürfnissen anzupassen!
Die Anpassungen werden mit einem vorangestellten Kommentar in der Form
# Tachtler
gekennzeichnet.
(Nur relevanter Ausschnitt )
# Tachtler
LoadModule jk_module modules/mod_jk.so
<IfModule jk_module>
Include conf/extra/mod_jk.conf
</IfModule >
Nachfolgende Konfigurationsdatei in nachfolgendem Verzeichnis mit nachfolgendem Namen
soll mit nachfolgendem Befehl neu angelegt werden und die Konfiguration des Moduls mod_jk
beinhalten:
# touch /etc/httpd/conf/extra/mod_jk.conf
Anschließend sollte nachfolgender Inhalt in die Konfigurationsdatei - /etc/httpd/conf/extra/mod_jk.conf
- eingefügt werden:
# Apache httpd and Apache Tomcat Connector Configuration.
# JkRequestLogFormat: %r %q - not used, because form-field e.g. password
# are shown.
# JkShmSize size can now be determined automatically
# JkShmSize 64k
<IfModule jk_module>
JkShmFile "/var/run/httpd/mod_jk.shm"
JkLogFile "/var/log/httpd/mod_jk.log"
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="/usr/share/tomcat9"
JkWorkerProperty workers.java_home="/usr/lib/jvm/default/bin"
JkWorkerProperty worker.list=worker1,jkstatus
JkWorkerProperty worker.jkstatus.type=status
JkWorkerProperty worker.worker1.type=ajp13
JkWorkerProperty worker.worker1.host=127.0.0.1
JkWorkerProperty worker.worker1.port =8099
</IfModule >
* Dies ist nur eine Beispielkonfiguration.
HINWEIS - Die Bedeutung der einzelnen Befehle kann in der Dokumentation
detailliert nachgelesen werden.
Erklärungen:
JkShmSize 64k
nur erforderlich für balancer- und status.worker - Zusätzlicher Cache-Speicher auf der Festplatte (Shared Memeory)
JkShmFile "/var/run/httpd/mod_jk.shm"
nur erforderlich für balancer- und status.worker - Datei für den zusätzlichen Cache-Speicher auf der Festplatte (Shared Memeory)
JkLogFile "/var/log/httpd/mod_jk.log"
Log-Datei des Modules mod_jk
JkLogLevel error
Loglevel der Log-Datei des Modules mod_jk - Standard ist info
JkLogStampFormat "[%a, %d.%m.%Y %H:%M:%S] "
Format des verwendeten Zeitstempels - siehe auch The Apache Tomcat Connector - Reference Guide
JkRequestLogFormat "%w %R %V %v %s %b %B %U %p %T %H %m"
Format des Log-Eintrags - siehe auch The Apache Tomcat Connector - Reference Guide
JkWorkerProperty workers.tomcat_home="/usr/share/tomcat9"
Heimatverzeichnis des Apache Tomcat
JkWorkerProperty workers.java_home="/usr/lib/jvm/default/bin"
Heimatverzeichnis der installierten Java-Version.
JkWorkerProperty worker.list=worker1,jkstatus
Definition der liste der worker
.
JkWorkerProperty worker.jkstatus.type=status
Definition des besonderen workers status
, über dessen Aufruf in einer URL eine Status-Anzeige erfolgt.
JkWorkerProperty worker.worker1.type=ajp13
Protokoll-Typ des AJP-Protokolls
JkWorkerProperty worker.worker1.host=127.0.0.1
IP-Adresse des Apache Tomcat -Servers
JkWorkerProperty worker.worker1.port =8099
AJP-Port des Apache Tomcat -Servers abgeändert !!!
/etc/httpd/conf/vhost/tomcat.conf
Falls kein virtueller Host definiert ist, können folgende Konfigurationsangaben ebenfalls in der Datei /etc/httpd/conf/httpd.conf
definiert werden.
Nachfolgend ein Beispiel für einen virtuellen Host :
#
# tomcat.tachtler.net (Apache Tomcat Applications)
#
<VirtualHost *:80 >
ServerAdmin webmaster@tachtler.net
ServerName tomcat.tachtler.net
ServerAlias www.tomcat.tachtler.net
ServerPath /
DocumentRoot "/var/lib/tomcat9/webapps/ROOT"
<Directory "/var/lib/tomcat9/webapps/ROOT" >
Options -Indexes +FollowSymLinks
AllowOverride None
Require all granted
</Directory >
# Protect META-INF-Directory
<Directory "/var/lib/tomcat9/webapps/ROOT/META-INF" >
AllowOverride None
Require all denied
</Directory >
# Protect WEB-INF-Directory
<Directory "/var/lib/tomcat9/webapps/ROOT/WEB-INF" >
AllowOverride None
Require all denied
</Directory >
<IfModule jk_module>
JkMount /*.action worker1
JkMount /*.jsp worker1
</IfModule >
DirectoryIndex index.htm index.jsp
ErrorLog logs/tomcat_error.log
SetEnvIf X-Forwarded-For "^.*\. .*\. .*\. .*" forwarded
CustomLog logs/tomcat_access.log combined env=!forwarded
CustomLog logs/tomcat_access.log combined_proxypass env=forwarded
</VirtualHost >
* Dies ist nur eine Beispielkonfiguration.
Die Bedeutung der einzelnen Befehle kann in der Dokumentation Apache Module mod_proxy detailliert nachgelesen werden.
Konfiguration: JkMount
Einfachste Variante: Alles weiterleiten
JkMount /* worker1
Die Zeile , weist den Apache HTTP Webserver alle angeforderten Seiten und deren Inhalt (Bilder, CSS -Dateien usw.) an den Apache Tomcat zur Erstellung weiterzuleiten.
Manuelle Variante: Vereinzelt weiterleiten - manueller Eingriff
JkMount /*.action worker1
JkMount /*.jsp worker1
Die erste Zeile , weist den Apache HTTP Webserver alle angeforderten Seiten mit der Endung .action
an den Apache Tomcat zur Erstellung weiterzuleiten. Die ist z.B. bei Nutzung des Apache Struts Frameworks der Fall.
Die zweite Zeile , weist den Apache HTTP Webserver alle angeforderten Seiten mit der Endung .jsp
an den Apache Tomcat zur Erstellung weiterzuleiten.
HINWEIS - Alle Seiteninhalte wie z.B. Bilder, CSS _Dateien usw.) werden NICHT an den Apache Tomcat zur Erstellung weitergeleitet, sondern durch den Apache HTTP Webserver ausgeliefert!
ACHTUNG - Diese Variante erfordert, das der Apache HTTP Webserver Dateisystem-Zugriff auf das Verzeichnis /var/lib/tomcat9/webapps/ROOT
hat !!!
Um den Apache HTTP Webserver lesenden Zugriff auf eventuelle Verzeichnisse und Dateien innerhalb des Verzeichnisses /var/lib/tomcat9/webapps/ROOT
zu verschaffen, können nachfolgende beiden Befehle verwendet werden:
Zugriff auf Unterverzeichnisse innerhalb von /var/lib/tomcat9/webapps/ROOT
für den Apache HTTP Webserver :
# find /var/lib/tomcat9/webapps/ROOT -type d -exec chmod 755 {} \;
Zugriff auf Dateien innerhalb von /var/lib/tomcat9/webapps/ROOT
für den Apache HTTP Webserver :
# find /var/lib/tomcat9/webapps/ROOT -type f -exec chmod 644 {} \;
Beste Variante: Vereinzelt weiterleiten - jsvc umask anpassen
JkMount /*.action worker1
JkMount /*.jsp worker1
Die erste Zeile , weist den Apache HTTP Webserver alle angeforderten Seiten mit der Endung .action
an den Apache Tomcat zur Erstellung weiterzuleiten. Die ist z.B. bei Nutzung des Apache Struts Frameworks der Fall.
Die zweite Zeile , weist den Apache HTTP Webserver alle angeforderten Seiten mit der Endung .jsp
an den Apache Tomcat zur Erstellung weiterzuleiten.
HINWEIS - Alle Seiteninhalte wie z.B. Bilder, CSS _Dateien usw.) werden NICHT an den Apache Tomcat zur Erstellung weitergeleitet, sondern durch den Apache HTTP Webserver ausgeliefert!
ACHTUNG - Diese Variante erfordert, das der Apache HTTP Webserver Dateisystem-Zugriff auf das Verzeichnis /var/lib/tomcat9/webapps/ROOT
hat !!!
Damit beim entpacken eines z.B. eigenen ROOT.war im Verzeichnis /var/lib/tomcat9/webapps
antsprechend gesetzte werden, ist nachfolgende Anpassung des systemd tomcat9.service
erforderlich:
Nachfolgend sollen einige Änderungen bzw. Ergänzungen an dieser Konfigurationsdatei durchgeführt werden, welchen ein Kommentar, wie nachfolgend dargestellt, voransteht:
# Tachtler
Die Änderungen an der Konfigurationsdatei tomcat9.service
können mit nachfolgendem Befehl bequem editiert werden:
# systemctl edit tomcat9.service
### Editing /etc/systemd/system/tomcat9.service.d/override.conf
### Anything between here and the comment below will become the contents of the drop-in file
[ Service]
Environment = CATALINA_OPTS= "-server -Xms512m -Xmx1024m"
ExecStart =
ExecStart = /usr/bin/jsvc \
-Dcatalina.home= ${ CATALINA_HOME} \
-Dcatalina.base= ${ CATALINA_BASE} \
-Djava.io.tmpdir= /var/tmp/tomcat9/temp \
-cp /usr/share/java/commons-daemon.jar:/usr/share/java/eclipse-ecj.jar:${ CATALINA_HOME} /bin/bootstrap.jar:${ CATALINA_HOME} /bin/tomcat-juli.jar \
-umask 0022 \
-user tomcat9 \
-java-home ${ TOMCAT_JAVA_HOME} \
-pidfile /var/run/tomcat9.pid \
-errfile ${ ERRFILE} \
-outfile ${ OUTFILE} \
$CATALINA_OPTS \
org.apache.catalina.startup.Bootstrap
### Edits below this comment will be discarded
### /usr/lib/systemd/system/tomcat9.service
# [ Unit]
# Description= Tomcat 9 servlet container
# After= network.target
#
# [ Service]
# Type= forking
# PIDFile= /var/run/tomcat9.pid
# Environment= CATALINA_PID=/var/run/tomcat9.pid
# Environment= TOMCAT_JAVA_HOME=/usr/lib/jvm/default-runtime
# Environment= CATALINA_HOME=/usr/share/tomcat9
# Environment= CATALINA_BASE=/usr/share/tomcat9
# Environment= CATALINA_OPTS=
# Environment= ERRFILE=SYSLOG
# Environment= OUTFILE=SYSLOG
#
# ExecStart= /usr/bin/jsvc \
# -Dcatalina.home= ${ CATALINA_HOME} \
# -Dcatalina.base= ${ CATALINA_BASE} \
# -Djava.io.tmpdir= /var/tmp/tomcat9/temp \
# -cp /usr/share/java/commons-daemon.jar:/usr/share/java/eclipse-ecj.jar:${ CATALINA_HOME} /bin/bootstrap. jar:${ CATALINA_HOME} /bin/tomcat-juli.jar \
# -user tomcat9 \
# -java-home ${ TOMCAT_JAVA_HOME} \
# -pidfile /var/run/tomcat9.pid \
# -errfile ${ ERRFILE} \
# -outfile ${ OUTFILE} \
# $CATALINA_OPTS \
# org.apache.catalina.startup.Bootstrap
#
# ExecStop= /usr/bin/jsvc \
# -pidfile /var/run/tomcat9.pid \
# -stop \
# org.apache.catalina.startup.Bootstrap
#
# [ Install]
# WantedBy= multi-user.target
Hier die komplette Konfigurationsdatei
mit allen Änderungen bzw. Ergänzungen, welche ebenfalls nachfolgend erklärt werden:
# cat /etc/systemd/system/tomcat9.service.d/override.conf
[ Service]
Environment = CATALINA_OPTS= "-server -Xms512m -Xmx1024m"
ExecStart =
ExecStart = /usr/bin/jsvc \
-Dcatalina.home= ${ CATALINA_HOME} \
-Dcatalina.base= ${ CATALINA_BASE} \
-Djava.io.tmpdir= /var/tmp/tomcat9/temp \
-cp /usr/share/java/commons-daemon.jar:/usr/share/java/eclipse-ecj.jar:${ CATALINA_HOME} /bin/bootstrap.jar:${ CATALINA_HOME} /bin/tomcat-juli.jar \
-umask 0022 \
-user tomcat9 \
-java-home ${ TOMCAT_JAVA_HOME} \
-pidfile /var/run/tomcat9.pid \
-errfile ${ ERRFILE} \
-outfile ${ OUTFILE} \
$CATALINA_OPTS \
org.apache.catalina.startup.Bootstrap
WICHTIG - Mit der ersten Direktive ExecStart=
werden die in der Originaldatei gesetzten Parameter geleert!
WICHTIG - Mit der zweiten Direktive ExecStart=/usr/bin/jsvc \…
usw. wird der Bereich komplett neu gesetzt!
ACHTUNG - Die Ergänzung -umask 0022 \
ist hier hinzugekommen !
Anschliessend können mit nachfolgendem Befehl die Änderungen übernommen werden:
# systemctl daemon-reload
Beispiel
Diese Website verwendet Cookies. Durch die Nutzung der Website stimmen Sie dem Speichern von Cookies auf Ihrem Computer zu. Außerdem bestätigen Sie, dass Sie unsere Datenschutzbestimmungen gelesen und verstanden haben. Wenn Sie nicht einverstanden sind, verlassen Sie die Website.
OK Weitere Information