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;








0















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?










share|improve this question






















  • 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

















0















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?










share|improve this question






















  • 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













0












0








0








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?










share|improve this question














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






share|improve this question













share|improve this question











share|improve this question




share|improve this question










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 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
















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










2 Answers
2






active

oldest

votes


















0














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.






share|improve this answer

























  • 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


















0














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'





share|improve this answer

























    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
    );



    );













    draft saved

    draft discarded


















    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









    0














    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.






    share|improve this answer

























    • 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















    0














    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.






    share|improve this answer

























    • 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













    0












    0








    0







    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.






    share|improve this answer















    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.







    share|improve this answer














    share|improve this answer



    share|improve this answer








    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 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

















    • 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
















    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













    0














    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'





    share|improve this answer





























      0














      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'





      share|improve this answer



























        0












        0








        0







        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'





        share|improve this answer















        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'






        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Oct 2 '18 at 22:57









        Patrick Mevzek

        3,03531226




        3,03531226










        answered Oct 2 '18 at 19:54









        SebastienSebastien

        1




        1



























            draft saved

            draft discarded
















































            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.




            draft saved


            draft discarded














            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





















































            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







            Popular posts from this blog

            RemoteApp sporadic failureWindows 2008 RemoteAPP client disconnects within a matter of minutesWhat is the minimum version of RDP supported by Server 2012 RDS?How to configure a Remoteapp server to increase stabilityMicrosoft RemoteApp Active SessionRDWeb TS connection broken for some users post RemoteApp certificate changeRemote Desktop Licensing, RemoteAPPRDS 2012 R2 some users are not able to logon after changed date and time on Connection BrokersWhat happens during Remote Desktop logon, and is there any logging?After installing RDS on WinServer 2016 I still can only connect with two users?RD Connection via RDGW to Session host is not connecting

            How to write a 12-bar blues melodyI-IV-V blues progressionHow to play the bridges in a standard blues progressionHow does Gdim7 fit in C# minor?question on a certain chord progressionMusicology of Melody12 bar blues, spread rhythm: alternative to 6th chord to avoid finger stretchChord progressions/ Root key/ MelodiesHow to put chords (POP-EDM) under a given lead vocal melody (starting from a good knowledge in music theory)Are there “rules” for improvising with the minor pentatonic scale over 12-bar shuffle?Confusion about blues scale and chords

            Esgonzo ibérico Índice Descrición Distribución Hábitat Ameazas Notas Véxase tamén "Acerca dos nomes dos anfibios e réptiles galegos""Chalcides bedriagai"Chalcides bedriagai en Carrascal, L. M. Salvador, A. (Eds). Enciclopedia virtual de los vertebrados españoles. Museo Nacional de Ciencias Naturales, Madrid. España.Fotos