Answer the question
In order to leave comments, you need to log in
How to set up a log in ngnix + nodejs, where to write something for the http request log?
upstream app_node {
ip_hash;
server server_local1 weight=10;
server server_local2 weight=20;
server server_local3 weight=50;
}
server {
listen 80 default_server;
...
access_log /var/log/nginx/app.access.log main;
error_log /var/log/nginx/app.error.log notice;
rewrite_log on;
fastcgi_buffers 256 16k;
fastcgi_buffer_size 32k;
location /rest {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy true;
proxy_pass http://app_node;
proxy_redirect off;
}
...
# дальше идут настройки php
}
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