0

Ich bin ein Seafile vm (privates Netzwerk) hinter einem Plesk vm (öffentlich).nginx proxy_pass und neu schreiben für seafile proxy

Momentan benutze ich Apache als Proxy, aber ich frage mich, wie ich dieses Setup nur mit nginx ausführen kann.

Dies funktioniert:

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/ 

Dies gilt nicht:

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; 
} 

Aber das wieder funktioniert:

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; 
} 

Was fehlt mir hier?

Dank Max

Antwort

0

Fix unter:

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; 
}