Skip to content

Sinopsia using a proxy is not working #147

@fchambo

Description

@fchambo

Using nginx as is mentioned in README.md is not working. Various bugs related, I list them by priority:

In the bugs I will use http://mycompany.com/sinopia as the value of url_prefix in config.yaml

  • BLOCKER: when we do npm adduser http://mycompany.com/sinopia, a 'PUT /-/user/org.couchdb.user:neuquino' request is done somewhere. And that url is missing the url_prefix.
  • MAJOR: all static resources use absolute urls like '/-/static/...' or '/-/search...' all those urls are 404 NOT FOUND.

Here I give you some example nginx config I'm using locally to test it:

/etc/nginx/conf.d/default

server {
    listen 43215;
    location ~ /npmjs/?(?<url>.*) {
        proxy_pass http://127.0.0.1:4873/$url;
    }
}

config.yaml

# if you use nginx with custom path, use this to override links
url_prefix: http://localhost:43215/npmjs/

# you can specify listen address (or simply a port)
listen: 0.0.0.0:4873

with this config, I enter Sinopia with this url: http://localhost:43215/npmjs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions