gpt4 book ai didi

apache2 - 在启用站点的 xml 配置中设置超时

转载 作者:行者123 更新时间:2023-12-03 18:28:14 34 4
gpt4 key购买 nike

为了使我的应用程序可通过 SSL 使用,我使用下面的配置。我现在的问题是如何将超时设置为 **。有没有办法做到这一点,语法如何?

# force HTTPS
<VirtualHost *:80>
ServerName app.xy.at

RewriteEngine on
RewriteCond %{SERVER_NAME} =app.xy.at
Redirect permanent "/" https://app.xy.at
RewriteRule (.*) https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>

# forward ORDS requests to tomcat
<VirtualHost *:443>
ServerName app.xy.at

# SSL certificates settings
#Include /etc/apache2/conf-enabled/options-ssl-apache.conf
SSLCertificateFile /etc/apache2/ssl/app.xy.at/fullchain.cer
SSLCertificateKeyFile /etc/apache2/ssl/app.xy.at/app.xy.at.key
SSLCertificateChainFile /etc/apache2/ssl/app.xy.at/ca.cer

ProxyRequests on
ProxyPreserveHost On
<Location / >
ProxyPass "ajp://localhost:9090/"
ProxyPassReverse "ajp://localhost:9090/"
</Location>

我将设置超时,因为我收到以下错误:

[Thu Mar 26 00:10:52.731383 2020] [proxy_ajp:error] [pid 16266:tid 
139926293157632] [client
xxx.xxx.3.59:60869] AH00893: dialog to 127.0.0.1:9090 (localhost)
failed, referer:
https domain
[Thu Mar 26 00:10:57.802571 2020] [proxy_ajp:error] [pid 16266:tid
139926720988928]
(70014)End of file found: AH01030: ajp_ilink_receive() can't receive
header
[Thu Mar 26 00:10:57.802597 2020] [proxy_ajp:error] [pid 16266:tid
139926720988928] [client
xxx.xxx.3.59:60875] AH00992: ajp_read_header: ajp_ilink_receive
failed, referer:
https domain
[Thu Mar 26 00:10:57.802628 2020] [proxy_ajp:error] [pid 16266:tid
139926720988928]
(120006)APR does not understand this error code: [client
xxxx.xxxx.3.59:60875] AH00878: read
response failed from 127.0.0.1:9090 (localhost), referer: https domain

我也不知道为什么。

最佳答案

根据documentation , 可以随url传递不同的参数,以键值对的形式

ProxyPass "protocol://domain.com" key1=value1 key2=value2 ...

对于你的情况,

ProxyPass "ajp://localhost:9090/" connectiontimeout=10 timeout=50

connectiontimeout : Connect timeout in seconds. The number of seconds Apache httpd waits for the creation of a connection to the backend to complete. By adding a postfix of ms, the timeout can be also set in milliseconds.

timeout : Connection timeout in seconds. The number of seconds Apache httpd waits for data sent by / to the backend.

关于apache2 - 在启用站点的 xml 配置中设置超时,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60861916/

34 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com