A
A
Alexey Yarkov2017-02-19 01:30:22
Nginx
Alexey Yarkov, 2017-02-19 01:30:22

Where did I go wrong with Nginx?

I can't figure out where I messed up. You need to do this:

# Только чтобы 127.0.0.1:8080/dev обрабатывался
location /dev {
    proxy_pass http://127.0.0.1:8080/dev$request_uri;
}
# Все остальные запросы
location / {
    proxy_pass http://127.0.0.1:8080/v1$request_uri;
}

In this form, requests to 127.0.0.1:8080/dev are redirected to 127.0.0.1:8080/v1/dev

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
Wexter, 2017-02-19
@Wexter

your first location will proxy to url 127.0.0.1:8080/dev/dev

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question