[英]Nginx logs are not writing
在我的 Nginx 中,我看不到日志正在更新。
下面是配置
/etc/nginx # more nginx.conf
user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
#tcp_nopush on;
keepalive_timeout 65;
#gzip on;
include /etc/nginx/conf.d/*.conf;
}
我可以看到文件在這里/var/log/nginx
下面是訪問狀態
/var/log/nginx # ls -lh
lrwxrwxrwx 1 root root 11 Jan 22 2020 access.log -> /dev/stdout
lrwxrwxrwx 1 root root 11 Jan 22 2020 error.log -> /dev/stderr
只是想知道配置中缺少什么。 請注意,此 nginx 在openshift
POD 內的openshift
容器上運行
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.