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

            Wikipedia:Vital articles Мазмуну Biography - Өмүр баян Philosophy and psychology - Философия жана психология Religion - Дин Social sciences - Коомдук илимдер Language and literature - Тил жана адабият Science - Илим Technology - Технология Arts and recreation - Искусство жана эс алуу History and geography - Тарых жана география Навигация менюсу

            Bruxelas-Capital Índice Historia | Composición | Situación lingüística | Clima | Cidades irmandadas | Notas | Véxase tamén | Menú de navegacióneO uso das linguas en Bruxelas e a situación do neerlandés"Rexión de Bruxelas Capital"o orixinalSitio da rexiónPáxina de Bruselas no sitio da Oficina de Promoción Turística de Valonia e BruxelasMapa Interactivo da Rexión de Bruxelas-CapitaleeWorldCat332144929079854441105155190212ID28008674080552-90000 0001 0666 3698n94104302ID540940339365017018237

            What should I write in an apology letter, since I have decided not to join a company after accepting an offer letterShould I keep looking after accepting a job offer?What should I do when I've been verbally told I would get an offer letter, but still haven't gotten one after 4 weeks?Do I accept an offer from a company that I am not likely to join?New job hasn't confirmed starting date and I want to give current employer as much notice as possibleHow should I address my manager in my resignation letter?HR delayed background verification, now jobless as resignedNo email communication after accepting a formal written offer. How should I phrase the call?What should I do if after receiving a verbal offer letter I am informed that my written job offer is put on hold due to some internal issues?Should I inform the current employer that I am about to resign within 1-2 weeks since I have signed the offer letter and waiting for visa?What company will do, if I send their offer letter to another company