Answer the question
In order to leave comments, you need to log in
How to configure nginx location?
Hello dear gurus!
I'm trying to configure the server to work as follows
When accessing my.site, you need to proxy to my.site:5000 (NextJs)
When accessing my.site/api, you need to return responses from the api service (PHP)
When accessing my.site/crm, you need do proxy to my.site:3006(React)
Here is what we have at the moment
location /api {
rewrite ^(.*)$ /api/public/index.html;
}
location /crm {
proxy_pass http://127.0.0.1:3006;
}
location / {
proxy_pass http://127.0.0.1:5000;
}
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