nginx apache配置的等效值是多少?

lskq00tm  于 2022-12-03  发布在  Nginx
关注(0)|答案(2)|浏览(130)

我需要转换下面的nginx规则到Apache配置。有人能帮助我吗?

location /chat {
   rewrite            /chat(/.+)$ $1 break;
   proxy_pass         http://localhost:8000;
   proxy_set_header   Host $host;
   proxy_set_header   Cookie $http_cookie;
   proxy_buffering    off;
   proxy_send_timeout 310;
}
egdjgwm8

egdjgwm81#

看一下mod_proxy documentation,我认为ProxyPassMatch指令很有用。

zfciruhq

zfciruhq2#

我会将它们转换为Apache2,如下所示:

ReWriteEngine on
ProxyPreserveHost On
ProxyPass "/chat"  "http://localhost:8000" flushpackets=on 
ProxyPassReverse "/chat"  "http://localhost:8000"
ProxyTimeout 310

在您的<VirtualHost *:443><Location /chat>区段中

相关问题