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

Multi tool use
Multi tool use

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







            DDw,3wqi,QOvQsj9vuO2dG 1VTqt8cd2wF8Jq gnSprRFwh2Tk,13qYOSGXoSX
            XmMZ9,eU7,L6HuW4xh qkimulkY,V3PVRCf,i CRVr6V87tZdb7NXrUeQef

            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

            Vilaño, A Laracha Índice Patrimonio | Lugares e parroquias | Véxase tamén | Menú de navegación43°14′52″N 8°36′03″O / 43.24775, -8.60070

            Cegueira Índice Epidemioloxía | Deficiencia visual | Tipos de cegueira | Principais causas de cegueira | Tratamento | Técnicas de adaptación e axudas | Vida dos cegos | Primeiros auxilios | Crenzas respecto das persoas cegas | Crenzas das persoas cegas | O neno deficiente visual | Aspectos psicolóxicos da cegueira | Notas | Véxase tamén | Menú de navegación54.054.154.436928256blindnessDicionario da Real Academia GalegaPortal das Palabras"International Standards: Visual Standards — Aspects and Ranges of Vision Loss with Emphasis on Population Surveys.""Visual impairment and blindness""Presentan un plan para previr a cegueira"o orixinalACCDV Associació Catalana de Cecs i Disminuïts Visuals - PMFTrachoma"Effect of gene therapy on visual function in Leber's congenital amaurosis"1844137110.1056/NEJMoa0802268Cans guía - os mellores amigos dos cegosArquivadoEscola de cans guía para cegos en Mortágua, PortugalArquivado"Tecnología para ciegos y deficientes visuales. Recopilación de recursos gratuitos en la Red""Colorino""‘COL.diesis’, escuchar los sonidos del color""COL.diesis: Transforming Colour into Melody and Implementing the Result in a Colour Sensor Device"o orixinal"Sistema de desarrollo de sinestesia color-sonido para invidentes utilizando un protocolo de audio""Enseñanza táctil - geometría y color. Juegos didácticos para niños ciegos y videntes""Sistema Constanz"L'ocupació laboral dels cecs a l'Estat espanyol està pràcticament equiparada a la de les persones amb visió, entrevista amb Pedro ZuritaONCE (Organización Nacional de Cegos de España)Prevención da cegueiraDescrición de deficiencias visuais (Disc@pnet)Braillín, un boneco atractivo para calquera neno, con ou sen discapacidade, que permite familiarizarse co sistema de escritura e lectura brailleAxudas Técnicas36838ID00897494007150-90057129528256DOID:1432HP:0000618D001766C10.597.751.941.162C97109C0155020