- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我有一个带有 Apache 2 + Tomcat 9 的新 Debian 10 服务器。由于内部服务器错误,我无法运行 JSF 页面。我认为错误出在 Apache Tomcat 连接器 (libapache2-mod-jk) 中..
我使用 OpenJDK v. 11,我还使用使用 APR 版本 [1.7.0] 的 Apache Tomcat Native 库 [1.2.23]。
Tomcat 和 Apache 定期运行。
这是我的 workers.properties 文件:
# workers.properties -
#
# This file is a simplified version of the workers.properties supplied
# with the upstream sources. The jni inprocess worker (not build in the
# debian package) section and the ajp12 (deprecated) section are removed.
#
# As a general note, the characters $( and ) are used internally to define
# macros. Do not use them in your own configuration!!!
#
# Whenever you see a set of lines such as:
# x=value
# y=$(x)\something
#
# the final value for y will be value\something
#
# Normaly all you will need to do is un-comment and modify the first three
# properties, i.e. workers.tomcat_home, workers.java_home and ps.
# Most of the configuration is derived from these.
#
# When you are done updating workers.tomcat_home, workers.java_home and ps
# you should have 3 workers configured:
#
# - An ajp13 worker that connects to localhost:8009
# - A load balancer worker
#
#
# OPTIONS ( very important for jni mode )
#
# workers.tomcat_home should point to the location where you
# installed tomcat. This is where you have your conf, webapps and lib
# directories.
#
workers.tomcat_home=/usr/share/tomcat9
#
# workers.java_home should point to your Java installation. Normally
# you should have a bin and lib directories beneath it.
#
workers.java_home=/usr/lib/jvm/java-11-openjdk-amd64
#
# You should configure your environment slash... ps=\ on NT and / on UNIX
# and maybe something different elsewhere.
#
ps=/
#
#------ ADVANCED MODE ------------------------------------------------
#---------------------------------------------------------------------
#
#
#------ worker list ------------------------------------------
#---------------------------------------------------------------------
#
#
# The workers that your plugins should create and work with
#
worker.list=ajp13_worker
#
#------ ajp13_worker WORKER DEFINITION ------------------------------
#---------------------------------------------------------------------
#
#
# Defining a worker named ajp13_worker and of type ajp13
# Note that the name and the type do not have to match.
#
worker.ajp13_worker.port=8009
worker.ajp13_worker.host=localhost
worker.ajp13_worker.type=ajp13
#
# Specifies the load balance factor when used with
# a load balancing worker.
# Note:
# ----> lbfactor must be > 0
# ----> Low lbfactor means less work done by the worker.
worker.ajp13_worker.lbfactor=1
#
# Specify the size of the open connection cache.
#worker.ajp13_worker.cachesize
#
#------ DEFAULT LOAD BALANCER WORKER DEFINITION ----------------------
#---------------------------------------------------------------------
#
#
# The loadbalancer (type lb) workers perform wighted round-robin
# load balancing with sticky sessions.
# Note:
# ----> If a worker dies, the load balancer will check its state
# once in a while. Until then all work is redirected to peer
# workers.
worker.loadbalancer.type=lb
worker.loadbalancer.balance_workers=ajp13_worker
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Configuration Example for mod_jk
# used in combination with Apache 2.2.x
<IfModule jk_module>
# We need a workers file exactly once
# and in the global server
JkWorkersFile /etc/libapache2-mod-jk/workers.properties
# Our JK error log
# You can (and should) use rotatelogs here
JkLogFile /var/log/apache2/mod_jk.log
# Our JK log level (trace,debug,info,warn,error)
JkLogLevel debug
# Our JK shared memory file
JkShmFile /var/log/apache2/jk-runtime-status
# Define a new log format you can use in any CustomLog in order
# to add mod_jk specific information to your access log.
# LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" \"%{Cookie}i\" \"%{Set-Cookie}o\" %{pid}P %{tid}P %{JK_LB_FIRST_NAME}n %{JK_LB_LAST_NAME}n ACC %{JK_LB_LAST_ACCESSED}n ERR %{JK_LB_LAST_ERRORS}n BSY %{JK_LB_LAST_BUSY}n %{JK_LB_LAST_STATE}n %D" extended_jk
# This option will reject all requests, which contain an
# encoded percent sign (%25) or backslash (%5C) in the URL
# If you are sure, that your webapp doesn't use such
# URLs, enable the option to prevent double encoding attacks.
# Since: 1.2.24
# JkOptions +RejectUnsafeURI
# After setting JkStripSession to "On", mod_jk will
# strip all ";jsessionid=..." from request URLs it
# does *not* forward to a backend.
# This is useful, if all links in a webapp use
# URLencoded session IDs and parts of the static
# content should be delivered directly by Apache.
# Of course you can also do it with mod_rewrite.
# Since: 1.2.21
# JkStripSession On
# Start a separate thread for internal tasks like
# idle connection probing, connection pool resizing
# and load value decay.
# Run these tasks every JkWatchdogInterval seconds.
# Since: 1.2.27
JkWatchdogInterval 60
# Configure access to jk-status and jk-manager
# If you want to make this available in a virtual host,
# either move this block into the virtual host
# or copy it logically there by including "JkMountCopy On"
# in the virtual host.
# Add an appropriate authentication method here!
<Location /jk-status>
# Inside Location we can omit the URL in JkMount
JkMount jk-status
Require ip 127.0.0.1
</Location>
<Location /jk-manager>
# Inside Location we can omit the URL in JkMount
JkMount jk-manager
Require ip 127.0.0.1
</Location>
# If you want to put all mounts into an external file
# that gets reloaded automatically after changes
# (with a default latency of 1 minute),
# you can define the name of the file here.
# JkMountFile conf/extra/uriworkermap.properties
# Example for Mounting a context to the worker "balancer"
# The URL syntax "a|b" instantiates two mounts at once,
# the first one is "a", the second one is "ab".
# JkMount /myapp|/* balancer
# Example for UnMounting requests for all workers
# using a simple URL pattern
# Since: 1.2.26
# JkUnMount /myapp/static/* *
# Example for UnMounting requests for a named worker
# JkUnMount /myapp/images/* balancer
# Example for UnMounting requests using regexps
# SetEnvIf REQUEST_URI "\.(htm|html|css|gif|jpg|js)$" no-jk
# Example for setting a reply timeout depending on the request URL
# Since: 1.2.27
# SetEnvIf Request_URI "/transactions/" JK_REPLY_TIMEOUT=600000
# Example for disabling reply timeouts for certain request URLs
# Since: 1.2.27
# SetEnvIf Request_URI "/reports/" JK_REPLY_TIMEOUT=0
# IMPORTANT: Mounts and virtual hosts
# If you are using VirtualHost elements, you
# - can put mounts only used in some virtual host into its VirtualHost element
# - can copy all global mounts to it using "JkMountCopy On" inside the VirtualHost
# - can copy all global mounts to all virtual hosts by putting
# "JkMountCopy All" into the global server
# Since: 1.2.26
</IfModule>
[Mon Nov 25 16:40:11.684 2019] [1914:140619718063232] [debug] jk_set_time_fmt::jk_util.c (487): Pre-processed log time stamp format is '[%a %b %d %H:%M:%S.000 %Y] '
[Mon Nov 25 16:40:11.684 2019] [1914:140619718063232] [debug] dump_options::mod_jk.c (678): JkOption 'ForwardURIProxy' set in server 'www.mydomain.com [*:80]' (default)
[Mon Nov 25 16:40:11.684 2019] [1914:140619718063232] [debug] dump_options::mod_jk.c (698): JkOption 'ForwardKeySize' set in server 'www.mydomain.com [*:80]' (default)
[Mon Nov 25 16:40:11.684 2019] [1914:140619718063232] [debug] uri_worker_map_open::jk_uri_worker_map.c (898): rule map size is 1
[Mon Nov 25 16:40:11.684 2019] [1914:140619718063232] [debug] uri_worker_map_add::jk_uri_worker_map.c (848): wildchar rule '/*=ajp13_worker' source 'JkMount' was added
[Mon Nov 25 16:40:11.684 2019] [1914:140619718063232] [debug] uri_worker_map_dump::jk_uri_worker_map.c (178): uri map dump after map open: id=0, index=0 file='(null)' reject_unsafe=0 reload=60 modified=0 checked=0
[Mon Nov 25 16:40:11.684 2019] [1914:140619718063232] [debug] uri_worker_map_dump::jk_uri_worker_map.c (184): generation 0: size=0 nosize=0 capacity=0
[Mon Nov 25 16:40:11.684 2019] [1914:140619718063232] [debug] uri_worker_map_dump::jk_uri_worker_map.c (184): generation 1: size=1 nosize=0 capacity=4
[Mon Nov 25 16:40:11.684 2019] [1914:140619718063232] [debug] uri_worker_map_dump::jk_uri_worker_map.c (197): NEXT (1) map #0: uri=/* worker=ajp13_worker context=/* source=JkMount type=Wildchar len=2
[Mon Nov 25 16:40:11.684 2019] [1914:140619718063232] [info] init_jk::mod_jk.c (3591): mod_jk/1.2.46 initialized
[Mon Nov 25 16:40:11.684 2019] [1914:140619718063232] [debug] wc_get_worker_for_name::jk_worker.c (120): did not find a worker ajp13_worker
[Mon Nov 25 16:40:11.684 2019] [1914:140619718063232] [error] extension_fix::jk_uri_worker_map.c (580): Could not find worker with name 'ajp13_worker' in uri map post processing.
[Mon Nov 25 16:40:11.684 2019] [1914:140619718063232] [debug] uri_worker_map_dump::jk_uri_worker_map.c (178): uri map dump after extension stripping: id=2, index=0 file='(null)' reject_unsafe=0 reload=60 modified=0 checked=0
[Mon Nov 25 16:40:11.684 2019] [1914:140619718063232] [debug] uri_worker_map_dump::jk_uri_worker_map.c (184): generation 0: size=0 nosize=0 capacity=0
[Mon Nov 25 16:40:11.684 2019] [1914:140619718063232] [debug] uri_worker_map_dump::jk_uri_worker_map.c (184): generation 1: size=1 nosize=0 capacity=4
[Mon Nov 25 16:40:11.684 2019] [1914:140619718063232] [debug] uri_worker_map_dump::jk_uri_worker_map.c (197): NEXT (1) map #0: uri=/* worker=ajp13_worker context=/* source=JkMount type=Wildchar len=2
[Mon Nov 25 16:40:11.684 2019] [1914:140619718063232] [debug] uri_worker_map_switch::jk_uri_worker_map.c (602): Switching uri worker map from index 0 to index 1
[Mon Nov 25 16:40:11.690 2019] [1915:140619718063232] [debug] jk_set_time_fmt::jk_util.c (487): Pre-processed log time stamp format is '[%a %b %d %H:%M:%S.000 %Y] '
[Mon Nov 25 16:40:11.690 2019] [1915:140619718063232] [debug] dump_options::mod_jk.c (678): JkOption 'ForwardURIProxy' set in server 'www.mydomain.com [*:80]' (default)
[Mon Nov 25 16:40:11.690 2019] [1915:140619718063232] [debug] dump_options::mod_jk.c (698): JkOption 'ForwardKeySize' set in server 'www.mydomain.com [*:80]' (default)
[Mon Nov 25 16:40:11.690 2019] [1915:140619718063232] [debug] uri_worker_map_open::jk_uri_worker_map.c (898): rule map size is 1
[Mon Nov 25 16:40:11.690 2019] [1915:140619718063232] [debug] uri_worker_map_add::jk_uri_worker_map.c (848): wildchar rule '/*=ajp13_worker' source 'JkMount' was added
[Mon Nov 25 16:40:11.690 2019] [1915:140619718063232] [debug] uri_worker_map_dump::jk_uri_worker_map.c (178): uri map dump after map open: id=0, index=0 file='(null)' reject_unsafe=0 reload=60 modified=0 checked=0
[Mon Nov 25 16:40:11.690 2019] [1915:140619718063232] [debug] uri_worker_map_dump::jk_uri_worker_map.c (184): generation 0: size=0 nosize=0 capacity=0
[Mon Nov 25 16:40:11.690 2019] [1915:140619718063232] [debug] uri_worker_map_dump::jk_uri_worker_map.c (184): generation 1: size=1 nosize=0 capacity=4
[Mon Nov 25 16:40:11.690 2019] [1915:140619718063232] [debug] uri_worker_map_dump::jk_uri_worker_map.c (197): NEXT (1) map #0: uri=/* worker=ajp13_worker context=/* source=JkMount type=Wildchar len=2
[Mon Nov 25 16:40:11.691 2019] [1915:140619718063232] [info] init_jk::mod_jk.c (3591): mod_jk/1.2.46 initialized
[Mon Nov 25 16:40:11.691 2019] [1915:140619718063232] [debug] wc_get_worker_for_name::jk_worker.c (120): did not find a worker ajp13_worker
[Mon Nov 25 16:40:11.691 2019] [1915:140619718063232] [error] extension_fix::jk_uri_worker_map.c (580): Could not find worker with name 'ajp13_worker' in uri map post processing.
[Mon Nov 25 16:40:11.691 2019] [1915:140619718063232] [debug] uri_worker_map_dump::jk_uri_worker_map.c (178): uri map dump after extension stripping: id=2, index=0 file='(null)' reject_unsafe=0 reload=60 modified=0 checked=0
[Mon Nov 25 16:40:11.691 2019] [1915:140619718063232] [debug] uri_worker_map_dump::jk_uri_worker_map.c (184): generation 0: size=0 nosize=0 capacity=0
[Mon Nov 25 16:40:11.691 2019] [1915:140619718063232] [debug] uri_worker_map_dump::jk_uri_worker_map.c (184): generation 1: size=1 nosize=0 capacity=4
[Mon Nov 25 16:40:11.691 2019] [1915:140619718063232] [debug] uri_worker_map_dump::jk_uri_worker_map.c (197): NEXT (1) map #0: uri=/* worker=ajp13_worker context=/* source=JkMount type=Wildchar len=2
[Mon Nov 25 16:40:11.691 2019] [1915:140619718063232] [debug] uri_worker_map_switch::jk_uri_worker_map.c (602): Switching uri worker map from index 0 to index 1
<VirtualHost *:80>
DocumentRoot "/var/www/vhosts/www.mydomain.com/ROOT"
ServerName www.mydomain.com
ServerAdmin info@mydomain.com
JkMount /* ajp13_worker
JkLogLevel debug
<Directory "/var/www/vhosts/www.mydomain.com/ROOT">
allow from all
Options None
Require all granted
</Directory>
</VirtualHost>
最佳答案
您必须从 httpd-jk.conf
重命名 JK 配置文件至 jk.conf
.
这对我有用:
$ sudo a2dismod jk
$ sudo mv /etc/apache2/mods-available/httpd-jk.conf /etc/apache2/mods-available/jk.conf
$ cd /etc/libapache2-mod-jk/
$ sudo ln -f -s ../apache2/mods-available/jk.conf httpd-jk.conf
$ sudo a2enmod jk
$ sudo apache2ctl configtest
$ sudo systemctl restart apache2
关于apache - 找不到名称为 'ajp13_worker' 的 worker ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59035732/
我们需要在我们的托管服务中托管一个 java richfaces/hibernate 应用程序。作为我们安全部门的要求,我们不能将该应用程序与我们的内部数据库建立任何连接。一个建议的解决方案是创建一个
我正在从 Jenkins 1.6.x 安装转移到 2.x。以下错误阻止 Jenkins 启动 Jul 02, 2016 12:51:42 PM org.eclipse.jetty.util.log.J
我需要在嵌入式 tomcat 中配置 AJP 连接器 https://tomcat.apache.org/tomcat-8.0-doc/config/ajp.html 相当于下面的配置: 怎么做?
我有一个应用程序,它使用 mod_proxy_ajp 配置了 apache 和 tomcat我们在 httpd.conf 中配置如下: # This is to redirect any reques
我正在使用带有 Apache 2.2.22 modproxy 的 Tomcat 7.0.29。 在 httpd.conf 中将 Ajp 配置为协议(protocol),在 server.xml 中配置
好吧,我在 wiki 上读过一篇小文章,对 AJP 做了一些解释。基本上该协议(protocol)用于 Apache 和应用程序服务器之间的通信。但为什么人们一开始就需要它呢?为什么不直接使用普通的
可通过 tomcat http 端口访问应用程序。从 Web 服务器(Apache http 服务器)访问时的应用程序会出现错误的网关错误。worker.properties(apache http
我们在与 ajp 连接器链接的 apache 网络服务器后面有一个 hybris 服务器。这是完美的,但是由于某种原因,在更新到 hybris 5.3(和 tomcat 7)之后,安全的 ajp 连接
我向我的 Spring Boot 2 项目添加了 AJP 连接器 @Bean public ServletWebServerFactory servletContainer() {
我们当前的生产网络环境使用: Web 服务器:Netscape iPlanet v4.1(别笑!) Servlet 容器:Tomcat 6.0.32 两者都在不同的服务器上运行 SunOS 5.9(S
我有这样的情况,我在 Windows 的同一台服务器上安装了多个 Tomcat。每个 Tomcat 都有自己的端口。第一个听8080 ajp 8009,第二个听8081 ajp 8010。 我的问题是
我正在尝试将 Apache WebServer (2.4.10) 连接到 Tomcat 7,两者都位于两个不同的虚拟机中。这是我第一次使用这些工具。据我了解,检查连接是否正常的方法是尝试使用 URL
我在 Apache 上使用 Kerberos + LDAP 进行身份验证。然后我创建了一个从 Apache 到 Tomcat 的 AJP。 由于 Apache 处理身份验证,有没有办法将远程用户安全地
我在 Windows 和 Tomcat 7 上使用 Apache 2.4。到目前为止,我一直在本地主机上测试所有内容。所以我本地的 Apache httpd.conf 有这个... Prox
我正在尝试运行 spring mvc 应用程序,但出现此错误 SEVERE [main] org.apache.coyote.AbstractProtocol.init Failed to initi
我有多个 grails 应用程序在 tomcat 服务器上运行,使用 ajp 协议(protocol)。在同一台服务器上,我将 apache 作为那些 tomcat 应用程序的前端运行。像这样的 ap
我在 Tomcat 8 上部署了一个公司应用程序,另一个应用程序向使用 AJP ` 协议(protocol)访问该应用程序的 Apache 服务器发出请求。我是 AJP 的新手。我已经使用带有上述应用
我在 JSF2 中有应用程序(使用 Primefaces)。我使用 h:outputStylesheet 将 url 解析为资源,因此指向我的 css 的链接如下所示: /project/javax.
我正在尝试配置我的 Apache 2.4 以连接到我的后端 Tomcat 8.0.28。在我的 Mac OS X El Capitan 中。 我使用了支持 AJP 的 NameBased Virtua
我们有一个非常默认的 apache2(2.2),mod_jk(1.2.30) 连接到同一个主机上的 tomcat(6),没有负载平衡器,只配置了 1 个 worker。 为了调试特定问题,我尝试增加
我是一名优秀的程序员,十分优秀!