Answer the question
In order to leave comments, you need to log in
Nginx: how to forward requests to a different port (within the same server)?
Hello. There is a service that accepts requests on port 8081. How can I configure nginx to listen on port 8080 and proxy requests to port 8081 to the application, logging the requests themselves to access.log?
Answer the question
In order to leave comments, you need to log in
server {
listen 0.0.0.0:8080;
access_log /path/to/access_log
location / {
proxy_pass http://127.0.0.1:8081/;
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question