Skip to content

Reverse Proxy Setup

kreutziger edited this page Mar 16, 2016 · 4 revisions

Apache

Apache and mod_proxy should not decode/encode slashes and leave them as they are:

<VirtualHost *:80>
  AllowEncodedSlashes NoDecode
  ProxyPass /npm http://127.0.0.1:4873 nocanon
  ProxyPassReverse /npm http://127.0.0.1:4873
</VirtualHost>

Nginx

(by https://github.com/rlidwka/sinopia/issues/380)

server {
  listen 80 default_server;
  location /sinopia/ {
    if ($request_uri ~* "^/sinopia(.*)$") {
      proxy_pass              http://127.0.0.1:4873$1;
    }
    proxy_pass              http://127.0.0.1:4873/;
  }
}
Clone this wiki locally