Empty nginx logsHow do I change the NGINX user?why do nginx process run with user nobodyHelp needed setting up nginx to serve static filesBlank Page: wordpress on nginx+php-fpmTrouble with nginx and serving from multiple directories under the same domainNginx gives 504 Gateway Time-out once moved to livenginx rewrite throw 404 with last and breakService Nginx doesn't workcentos 7 : nginx givers error when enabling logNginx server doesnt write access logsRecords (logs) in nginx, blank are created but not updatedMissing 503 responses in NGINX logs
Count Even Digits In Number
A steel cutting sword?
What is the object moving across the ceiling in this stock footage?
Is DateWithin30Days(Date 1, Date 2) an Apex Method?
Are these reasonable traits for someone with autism?
Can a person survive on blood in place of water?
I know that there is a preselected candidate for a position to be filled at my department. What should I do?
what kind of chord progession is this?
My employer faked my resume to acquire projects
Does Nitrogen inside commercial airliner wheels prevent blowouts on touchdown?
Is the taxi route omitted in low visibility (LVP)?
Could a 19.25mm revolver actually exist?
Employer asking for online access to bank account - Is this a scam?
Compaq Portable vs IBM 5155 Portable PC
Have 1.5% of all nuclear reactors ever built melted down?
What was the idiom for something that we take without a doubt?
Is Jon Snow the last of his House?
Where's this lookout in Nova Scotia?
What to do when you've set the wrong ISO for your film?
Plot twist where the antagonist wins
Teacher help me explain this to my students
Where have Brexit voters gone?
Why did David Cameron offer a referendum on the European Union?
Sitecore 9.0 works with solr 7.2.1?
Empty nginx logs
How do I change the NGINX user?why do nginx process run with user nobodyHelp needed setting up nginx to serve static filesBlank Page: wordpress on nginx+php-fpmTrouble with nginx and serving from multiple directories under the same domainNginx gives 504 Gateway Time-out once moved to livenginx rewrite throw 404 with last and breakService Nginx doesn't workcentos 7 : nginx givers error when enabling logNginx server doesnt write access logsRecords (logs) in nginx, blank are created but not updatedMissing 503 responses in NGINX logs
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
I'm trying to get nginx to log access and error logs. My logs currently have very old content, a mix of logs and gzipped logs.
$ ls -la access*.log*
-rw-rw-rw- 1 nobody nogroup 0 Jan 8 2016 access.log
-rw-rw-rw- 1 nobody nogroup 2261400 Jan 7 2016 access.log.1
-rw-rw-rw- 1 nobody nogroup 311947 Dec 30 2015 access.log.10.gz
-rw-rw-rw- 1 nobody nogroup 434744 Dec 29 2015 access.log.11.gz
My configuration is:
user www-data www-data;
error_log /var/log/nginx/error.log info;
...
http {
access_log /var/log/nginx/access.log combined;
...
Strangely, despite the user
declaration the worker processes still run as nobody:
# ps -eo "%U %G %a" | grep nginx
root root nginx: master process /usr/local/openresty/nginx/sbin/nginx -c /usr/local/openresty/nginx/conf/nginx.conf
nobody nogroup nginx: worker process
nobody nogroup nginx: worker process
I tried setting the owner of the existing access.log
and error.log
files to be nobody:nogroup
but still it doesn't log anything.
There's nothing (relevant) in syslog
.
I have tried a mixture (!) or reloading and restarting nginx after changing the configuration file. Still nothing...
How is my configuration incorrect?
nginx
add a comment |
I'm trying to get nginx to log access and error logs. My logs currently have very old content, a mix of logs and gzipped logs.
$ ls -la access*.log*
-rw-rw-rw- 1 nobody nogroup 0 Jan 8 2016 access.log
-rw-rw-rw- 1 nobody nogroup 2261400 Jan 7 2016 access.log.1
-rw-rw-rw- 1 nobody nogroup 311947 Dec 30 2015 access.log.10.gz
-rw-rw-rw- 1 nobody nogroup 434744 Dec 29 2015 access.log.11.gz
My configuration is:
user www-data www-data;
error_log /var/log/nginx/error.log info;
...
http {
access_log /var/log/nginx/access.log combined;
...
Strangely, despite the user
declaration the worker processes still run as nobody:
# ps -eo "%U %G %a" | grep nginx
root root nginx: master process /usr/local/openresty/nginx/sbin/nginx -c /usr/local/openresty/nginx/conf/nginx.conf
nobody nogroup nginx: worker process
nobody nogroup nginx: worker process
I tried setting the owner of the existing access.log
and error.log
files to be nobody:nogroup
but still it doesn't log anything.
There's nothing (relevant) in syslog
.
I have tried a mixture (!) or reloading and restarting nginx after changing the configuration file. Still nothing...
How is my configuration incorrect?
nginx
In the first command block, are you actually in the directory named/var/log/nginx/
? Also, it's possible thaterror_log
&access_log
are configured a second time in another file, and the first configuration is ignored.
– Stefan Lasiewski
Oct 2 '18 at 23:28
add a comment |
I'm trying to get nginx to log access and error logs. My logs currently have very old content, a mix of logs and gzipped logs.
$ ls -la access*.log*
-rw-rw-rw- 1 nobody nogroup 0 Jan 8 2016 access.log
-rw-rw-rw- 1 nobody nogroup 2261400 Jan 7 2016 access.log.1
-rw-rw-rw- 1 nobody nogroup 311947 Dec 30 2015 access.log.10.gz
-rw-rw-rw- 1 nobody nogroup 434744 Dec 29 2015 access.log.11.gz
My configuration is:
user www-data www-data;
error_log /var/log/nginx/error.log info;
...
http {
access_log /var/log/nginx/access.log combined;
...
Strangely, despite the user
declaration the worker processes still run as nobody:
# ps -eo "%U %G %a" | grep nginx
root root nginx: master process /usr/local/openresty/nginx/sbin/nginx -c /usr/local/openresty/nginx/conf/nginx.conf
nobody nogroup nginx: worker process
nobody nogroup nginx: worker process
I tried setting the owner of the existing access.log
and error.log
files to be nobody:nogroup
but still it doesn't log anything.
There's nothing (relevant) in syslog
.
I have tried a mixture (!) or reloading and restarting nginx after changing the configuration file. Still nothing...
How is my configuration incorrect?
nginx
I'm trying to get nginx to log access and error logs. My logs currently have very old content, a mix of logs and gzipped logs.
$ ls -la access*.log*
-rw-rw-rw- 1 nobody nogroup 0 Jan 8 2016 access.log
-rw-rw-rw- 1 nobody nogroup 2261400 Jan 7 2016 access.log.1
-rw-rw-rw- 1 nobody nogroup 311947 Dec 30 2015 access.log.10.gz
-rw-rw-rw- 1 nobody nogroup 434744 Dec 29 2015 access.log.11.gz
My configuration is:
user www-data www-data;
error_log /var/log/nginx/error.log info;
...
http {
access_log /var/log/nginx/access.log combined;
...
Strangely, despite the user
declaration the worker processes still run as nobody:
# ps -eo "%U %G %a" | grep nginx
root root nginx: master process /usr/local/openresty/nginx/sbin/nginx -c /usr/local/openresty/nginx/conf/nginx.conf
nobody nogroup nginx: worker process
nobody nogroup nginx: worker process
I tried setting the owner of the existing access.log
and error.log
files to be nobody:nogroup
but still it doesn't log anything.
There's nothing (relevant) in syslog
.
I have tried a mixture (!) or reloading and restarting nginx after changing the configuration file. Still nothing...
How is my configuration incorrect?
nginx
nginx
asked Feb 10 '17 at 15:16
Dan GravellDan Gravell
15118
15118
In the first command block, are you actually in the directory named/var/log/nginx/
? Also, it's possible thaterror_log
&access_log
are configured a second time in another file, and the first configuration is ignored.
– Stefan Lasiewski
Oct 2 '18 at 23:28
add a comment |
In the first command block, are you actually in the directory named/var/log/nginx/
? Also, it's possible thaterror_log
&access_log
are configured a second time in another file, and the first configuration is ignored.
– Stefan Lasiewski
Oct 2 '18 at 23:28
In the first command block, are you actually in the directory named
/var/log/nginx/
? Also, it's possible that error_log
& access_log
are configured a second time in another file, and the first configuration is ignored.– Stefan Lasiewski
Oct 2 '18 at 23:28
In the first command block, are you actually in the directory named
/var/log/nginx/
? Also, it's possible that error_log
& access_log
are configured a second time in another file, and the first configuration is ignored.– Stefan Lasiewski
Oct 2 '18 at 23:28
add a comment |
2 Answers
2
active
oldest
votes
You might want to refer to these topics for configuring nginx user:
How do I change the NGINX user?
why do nginx process run with user nobody
About nginx empty logs I suggest you to empty logs directory or temporary disable Selinux to see if it's causing the trouble setenrofce 0
You can also check if you have the right syntax and error_log directive is in the correct place.
Yes, I had reviewed those questions already. As above, I have set the user but it doesn't appear to take effect. I considered a separate "why does the user directive work for me" question but what I actually want to know right now is why the logs don't populate - even withchmod 777
they still don't work, so I don't think it's permissions. SELinux is not enabled on this system.nginx -t
reports the configuration is ok.
– Dan Gravell
Feb 13 '17 at 10:48
I also tried clearing out the logs but no difference so far...
– Dan Gravell
Feb 13 '17 at 10:54
add a comment |
I had the exact same issue, and in the end, I went to my root folder and found out there was another access.log
file, in a different location and this other one was being written to.
cd /
find . -name 'access.log'
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "2"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f831844%2fempty-nginx-logs%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
You might want to refer to these topics for configuring nginx user:
How do I change the NGINX user?
why do nginx process run with user nobody
About nginx empty logs I suggest you to empty logs directory or temporary disable Selinux to see if it's causing the trouble setenrofce 0
You can also check if you have the right syntax and error_log directive is in the correct place.
Yes, I had reviewed those questions already. As above, I have set the user but it doesn't appear to take effect. I considered a separate "why does the user directive work for me" question but what I actually want to know right now is why the logs don't populate - even withchmod 777
they still don't work, so I don't think it's permissions. SELinux is not enabled on this system.nginx -t
reports the configuration is ok.
– Dan Gravell
Feb 13 '17 at 10:48
I also tried clearing out the logs but no difference so far...
– Dan Gravell
Feb 13 '17 at 10:54
add a comment |
You might want to refer to these topics for configuring nginx user:
How do I change the NGINX user?
why do nginx process run with user nobody
About nginx empty logs I suggest you to empty logs directory or temporary disable Selinux to see if it's causing the trouble setenrofce 0
You can also check if you have the right syntax and error_log directive is in the correct place.
Yes, I had reviewed those questions already. As above, I have set the user but it doesn't appear to take effect. I considered a separate "why does the user directive work for me" question but what I actually want to know right now is why the logs don't populate - even withchmod 777
they still don't work, so I don't think it's permissions. SELinux is not enabled on this system.nginx -t
reports the configuration is ok.
– Dan Gravell
Feb 13 '17 at 10:48
I also tried clearing out the logs but no difference so far...
– Dan Gravell
Feb 13 '17 at 10:54
add a comment |
You might want to refer to these topics for configuring nginx user:
How do I change the NGINX user?
why do nginx process run with user nobody
About nginx empty logs I suggest you to empty logs directory or temporary disable Selinux to see if it's causing the trouble setenrofce 0
You can also check if you have the right syntax and error_log directive is in the correct place.
You might want to refer to these topics for configuring nginx user:
How do I change the NGINX user?
why do nginx process run with user nobody
About nginx empty logs I suggest you to empty logs directory or temporary disable Selinux to see if it's causing the trouble setenrofce 0
You can also check if you have the right syntax and error_log directive is in the correct place.
edited Apr 13 '17 at 12:14
Community♦
1
1
answered Feb 10 '17 at 15:46
Ali PandidanAli Pandidan
1,339267
1,339267
Yes, I had reviewed those questions already. As above, I have set the user but it doesn't appear to take effect. I considered a separate "why does the user directive work for me" question but what I actually want to know right now is why the logs don't populate - even withchmod 777
they still don't work, so I don't think it's permissions. SELinux is not enabled on this system.nginx -t
reports the configuration is ok.
– Dan Gravell
Feb 13 '17 at 10:48
I also tried clearing out the logs but no difference so far...
– Dan Gravell
Feb 13 '17 at 10:54
add a comment |
Yes, I had reviewed those questions already. As above, I have set the user but it doesn't appear to take effect. I considered a separate "why does the user directive work for me" question but what I actually want to know right now is why the logs don't populate - even withchmod 777
they still don't work, so I don't think it's permissions. SELinux is not enabled on this system.nginx -t
reports the configuration is ok.
– Dan Gravell
Feb 13 '17 at 10:48
I also tried clearing out the logs but no difference so far...
– Dan Gravell
Feb 13 '17 at 10:54
Yes, I had reviewed those questions already. As above, I have set the user but it doesn't appear to take effect. I considered a separate "why does the user directive work for me" question but what I actually want to know right now is why the logs don't populate - even with
chmod 777
they still don't work, so I don't think it's permissions. SELinux is not enabled on this system. nginx -t
reports the configuration is ok.– Dan Gravell
Feb 13 '17 at 10:48
Yes, I had reviewed those questions already. As above, I have set the user but it doesn't appear to take effect. I considered a separate "why does the user directive work for me" question but what I actually want to know right now is why the logs don't populate - even with
chmod 777
they still don't work, so I don't think it's permissions. SELinux is not enabled on this system. nginx -t
reports the configuration is ok.– Dan Gravell
Feb 13 '17 at 10:48
I also tried clearing out the logs but no difference so far...
– Dan Gravell
Feb 13 '17 at 10:54
I also tried clearing out the logs but no difference so far...
– Dan Gravell
Feb 13 '17 at 10:54
add a comment |
I had the exact same issue, and in the end, I went to my root folder and found out there was another access.log
file, in a different location and this other one was being written to.
cd /
find . -name 'access.log'
add a comment |
I had the exact same issue, and in the end, I went to my root folder and found out there was another access.log
file, in a different location and this other one was being written to.
cd /
find . -name 'access.log'
add a comment |
I had the exact same issue, and in the end, I went to my root folder and found out there was another access.log
file, in a different location and this other one was being written to.
cd /
find . -name 'access.log'
I had the exact same issue, and in the end, I went to my root folder and found out there was another access.log
file, in a different location and this other one was being written to.
cd /
find . -name 'access.log'
edited Oct 2 '18 at 22:57
Patrick Mevzek
3,03531226
3,03531226
answered Oct 2 '18 at 19:54
SebastienSebastien
1
1
add a comment |
add a comment |
Thanks for contributing an answer to Server Fault!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f831844%2fempty-nginx-logs%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
In the first command block, are you actually in the directory named
/var/log/nginx/
? Also, it's possible thaterror_log
&access_log
are configured a second time in another file, and the first configuration is ignored.– Stefan Lasiewski
Oct 2 '18 at 23:28