0

我在Plesk虚拟机(公共)后面运行seafile vm(专用网络)。nginx proxy_pass并重写海文件代理

现在我使用Apache作为代理,但想知道如何使用nginx运行此设置。

这工作:

RewriteEngine On 

ProxyPass /seafhttp http://192.168.10.102:8082 
ProxyPassReverse /seafhttp http://192.168.10.102:8082 
RewriteRule ^/seafhttp - [QSA,L] 

RewriteRule ^/(.*) http://192.168.10.102:8000/$1 [P] 
ProxyPassReverse/http://192.168.10.102:8000/ 

这不:

location /seafhttp { 
    rewrite ^/seafhttp(.*)$ $1 break; 
    proxy_pass http://192.168.10.102:8082; 
    client_max_body_size 0; 
    proxy_connect_timeout 36000s; 
    proxy_read_timeout 36000s; 
    proxy_send_timeout 36000s; 
    send_timeout 36000s; 
} 

location ~/{ 
    proxy_pass http://192.168.10.101:8065; 
} 

但这再做工作:

RewriteEngine On 

RewriteRule ^/(.*) http://192.168.10.102:8000/$1 [P] 
ProxyPassReverse/http://192.168.10.102:8000/ 

+

location /seafhttp { 
    rewrite ^/seafhttp(.*)$ $1 break; 
    proxy_pass http://192.168.10.102:8082; 
    client_max_body_size 0; 
    proxy_connect_timeout 36000s; 
    proxy_read_timeout 36000s; 
    proxy_send_timeout 36000s; 
    send_timeout 36000s; 
} 

我在这里错过了什么?下面

感谢 最大

回答

0

修复:

location ^~ /seafhttp { 
    rewrite ^/seafhttp(.*)$ $1 break; 
    proxy_pass http://192.168.10.102:8082; 
    client_max_body_size 0; 
    proxy_connect_timeout 36000s; 
    proxy_read_timeout 36000s; 
    proxy_send_timeout 36000s; 
    send_timeout 36000s; 
} 

location ~/{ 
    proxy_pass http://192.168.10.102:8000; 
}