Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use this app on base path url #40

Open
kantium opened this issue Jan 9, 2018 · 0 comments
Open

Use this app on base path url #40

kantium opened this issue Jan 9, 2018 · 0 comments

Comments

@kantium
Copy link

kantium commented Jan 9, 2018

Hello,

I would like to use this app on a sub url like https://exemple.com/explorer/
I setup this app with an nginx reverse proxy. The proxy work, and I gan get the index page,
but every link are wrong and goes to https://exemple.com/block instead of https://exemple.com/explorer/block

I tried but I'm unable to (and don't have enough knowledge) to edit the app.js file successfully.
I tried to put a router with var router = express.Router();
and edit all routes to router.use('/block', block); and finally make the app use app.use('/explorer', router); but it's not working.

Could someone help me ?
Thanks

Nginx config

location /explorer/ {
                proxy_set_header Host $host;
		proxy_set_header X-Forwarded-Host $host;
                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header X-Forwarded-Proto $scheme;
                proxy_redirect         off;
                proxy_pass http://localhost:3000/;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant