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

            Club Baloncesto Breogán Índice Historia | Pavillón | Nome | O Breogán na cultura popular | Xogadores | Adestradores | Presidentes | Palmarés | Historial | Líderes | Notas | Véxase tamén | Menú de navegacióncbbreogan.galCadroGuía oficial da ACB 2009-10, páxina 201Guía oficial ACB 1992, páxina 183. Editorial DB.É de 6.500 espectadores sentados axeitándose á última normativa"Estudiantes Junior, entre as mellores canteiras"o orixinalHemeroteca El Mundo Deportivo, 16 setembro de 1970, páxina 12Historia do BreogánAlfredo Pérez, o último canoneiroHistoria C.B. BreogánHemeroteca de El Mundo DeportivoJimmy Wright, norteamericano do Breogán deixará Lugo por ameazas de morteResultados de Breogán en 1986-87Resultados de Breogán en 1990-91Ficha de Velimir Perasović en acb.comResultados de Breogán en 1994-95Breogán arrasa al Barça. "El Mundo Deportivo", 27 de setembro de 1999, páxina 58CB Breogán - FC BarcelonaA FEB invita a participar nunha nova Liga EuropeaCharlie Bell na prensa estatalMáximos anotadores 2005Tempada 2005-06 : Tódolos Xogadores da Xornada""Non quero pensar nunha man negra, mais pregúntome que está a pasar""o orixinalRaúl López, orgulloso dos xogadores, presume da boa saúde económica do BreogánJulio González confirma que cesa como presidente del BreogánHomenaxe a Lisardo GómezA tempada do rexurdimento celesteEntrevista a Lisardo GómezEl COB dinamita el Pazo para forzar el quinto (69-73)Cafés Candelas, patrocinador del CB Breogán"Suso Lázare, novo presidente do Breogán"o orixinalCafés Candelas Breogán firma el mayor triunfo de la historiaEl Breogán realizará 17 homenajes por su cincuenta aniversario"O Breogán honra ao seu fundador e primeiro presidente"o orixinalMiguel Giao recibiu a homenaxe do PazoHomenaxe aos primeiros gladiadores celestesO home que nos amosa como ver o Breo co corazónTita Franco será homenaxeada polos #50anosdeBreoJulio Vila recibirá unha homenaxe in memoriam polos #50anosdeBreo"O Breogán homenaxeará aos seus aboados máis veteráns"Pechada ovación a «Capi» Sanmartín e Ricardo «Corazón de González»Homenaxe por décadas de informaciónPaco García volve ao Pazo con motivo do 50 aniversario"Resultados y clasificaciones""O Cafés Candelas Breogán, campión da Copa Princesa""O Cafés Candelas Breogán, equipo ACB"C.B. Breogán"Proxecto social"o orixinal"Centros asociados"o orixinalFicha en imdb.comMario Camus trata la recuperación del amor en 'La vieja música', su última película"Páxina web oficial""Club Baloncesto Breogán""C. B. Breogán S.A.D."eehttp://www.fegaba.com

            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