Answer the question
In order to leave comments, you need to log in
How to rewrite a redirect in Nginx?
Hello!
The task is such
There is a site.com domain and languages .. for example ru, en
if the user accesses the site.com link, then nginx should redirect to site.com/en/physical
and if it is not empty, that is, there is an nginx url after site.com should listen to localhost 3300
and now I have it like this
location / {
client_max_body_size 200M;
proxy_pass http://localhost:3300;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question