Nginx test failed, service not starting

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
0
down vote

favorite












nginx did not start upon system reboot. tried to manually start it in the terminal. received the following errors. what do they mean, and how do I fix it so that nginx starts?



● nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Fri 2018-05-18 11:45:39 EDT; 10s ago
Docs: man:nginx(8)
Process: 23664 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE)

May 18 11:45:39 jUbuntu systemd[1]: Starting A high performance web server and a reverse proxy server...
May 18 11:45:39 jUbuntu nginx[23664]: nginx: [alert] could not open error log file: open() "/var/log/nginx/error.log" failed (2: No such file or directory)
May 18 11:45:39 jUbuntu nginx[23664]: 2018/05/18 11:45:39 [emerg] 23664#23664: open() "/var/log/nginx/access.log" failed (2: No such file or directory)
May 18 11:45:39 jUbuntu nginx[23664]: nginx: configuration file /etc/nginx/nginx.conf test failed
May 18 11:45:39 jUbuntu systemd[1]: nginx.service: Control process exited, code=exited status=1
May 18 11:45:39 jUbuntu systemd[1]: nginx.service: Failed with result 'exit-code'.
May 18 11:45:39 jUbuntu systemd[1]: Failed to start A high performance web server and a reverse proxy server.






share|improve this question
























    up vote
    0
    down vote

    favorite












    nginx did not start upon system reboot. tried to manually start it in the terminal. received the following errors. what do they mean, and how do I fix it so that nginx starts?



    ● nginx.service - A high performance web server and a reverse proxy server
    Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
    Active: failed (Result: exit-code) since Fri 2018-05-18 11:45:39 EDT; 10s ago
    Docs: man:nginx(8)
    Process: 23664 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE)

    May 18 11:45:39 jUbuntu systemd[1]: Starting A high performance web server and a reverse proxy server...
    May 18 11:45:39 jUbuntu nginx[23664]: nginx: [alert] could not open error log file: open() "/var/log/nginx/error.log" failed (2: No such file or directory)
    May 18 11:45:39 jUbuntu nginx[23664]: 2018/05/18 11:45:39 [emerg] 23664#23664: open() "/var/log/nginx/access.log" failed (2: No such file or directory)
    May 18 11:45:39 jUbuntu nginx[23664]: nginx: configuration file /etc/nginx/nginx.conf test failed
    May 18 11:45:39 jUbuntu systemd[1]: nginx.service: Control process exited, code=exited status=1
    May 18 11:45:39 jUbuntu systemd[1]: nginx.service: Failed with result 'exit-code'.
    May 18 11:45:39 jUbuntu systemd[1]: Failed to start A high performance web server and a reverse proxy server.






    share|improve this question






















      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      nginx did not start upon system reboot. tried to manually start it in the terminal. received the following errors. what do they mean, and how do I fix it so that nginx starts?



      ● nginx.service - A high performance web server and a reverse proxy server
      Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
      Active: failed (Result: exit-code) since Fri 2018-05-18 11:45:39 EDT; 10s ago
      Docs: man:nginx(8)
      Process: 23664 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE)

      May 18 11:45:39 jUbuntu systemd[1]: Starting A high performance web server and a reverse proxy server...
      May 18 11:45:39 jUbuntu nginx[23664]: nginx: [alert] could not open error log file: open() "/var/log/nginx/error.log" failed (2: No such file or directory)
      May 18 11:45:39 jUbuntu nginx[23664]: 2018/05/18 11:45:39 [emerg] 23664#23664: open() "/var/log/nginx/access.log" failed (2: No such file or directory)
      May 18 11:45:39 jUbuntu nginx[23664]: nginx: configuration file /etc/nginx/nginx.conf test failed
      May 18 11:45:39 jUbuntu systemd[1]: nginx.service: Control process exited, code=exited status=1
      May 18 11:45:39 jUbuntu systemd[1]: nginx.service: Failed with result 'exit-code'.
      May 18 11:45:39 jUbuntu systemd[1]: Failed to start A high performance web server and a reverse proxy server.






      share|improve this question












      nginx did not start upon system reboot. tried to manually start it in the terminal. received the following errors. what do they mean, and how do I fix it so that nginx starts?



      ● nginx.service - A high performance web server and a reverse proxy server
      Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
      Active: failed (Result: exit-code) since Fri 2018-05-18 11:45:39 EDT; 10s ago
      Docs: man:nginx(8)
      Process: 23664 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE)

      May 18 11:45:39 jUbuntu systemd[1]: Starting A high performance web server and a reverse proxy server...
      May 18 11:45:39 jUbuntu nginx[23664]: nginx: [alert] could not open error log file: open() "/var/log/nginx/error.log" failed (2: No such file or directory)
      May 18 11:45:39 jUbuntu nginx[23664]: 2018/05/18 11:45:39 [emerg] 23664#23664: open() "/var/log/nginx/access.log" failed (2: No such file or directory)
      May 18 11:45:39 jUbuntu nginx[23664]: nginx: configuration file /etc/nginx/nginx.conf test failed
      May 18 11:45:39 jUbuntu systemd[1]: nginx.service: Control process exited, code=exited status=1
      May 18 11:45:39 jUbuntu systemd[1]: nginx.service: Failed with result 'exit-code'.
      May 18 11:45:39 jUbuntu systemd[1]: Failed to start A high performance web server and a reverse proxy server.








      share|improve this question











      share|improve this question




      share|improve this question










      asked May 18 at 15:50









      aregowe

      113




      113




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote



          accepted










          Found the answer:



          In /var/log/ there wasn't an nginx folder.



          I added an nginx folder to /var/log/ so that the /var/log/nginx folder is present and usable.






          share|improve this answer






















            Your Answer







            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "89"
            ;
            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',
            convertImagesToLinks: true,
            noModals: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );








             

            draft saved


            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1037818%2fnginx-test-failed-service-not-starting%23new-answer', 'question_page');

            );

            Post as a guest






























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            0
            down vote



            accepted










            Found the answer:



            In /var/log/ there wasn't an nginx folder.



            I added an nginx folder to /var/log/ so that the /var/log/nginx folder is present and usable.






            share|improve this answer


























              up vote
              0
              down vote



              accepted










              Found the answer:



              In /var/log/ there wasn't an nginx folder.



              I added an nginx folder to /var/log/ so that the /var/log/nginx folder is present and usable.






              share|improve this answer
























                up vote
                0
                down vote



                accepted







                up vote
                0
                down vote



                accepted






                Found the answer:



                In /var/log/ there wasn't an nginx folder.



                I added an nginx folder to /var/log/ so that the /var/log/nginx folder is present and usable.






                share|improve this answer














                Found the answer:



                In /var/log/ there wasn't an nginx folder.



                I added an nginx folder to /var/log/ so that the /var/log/nginx folder is present and usable.







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited May 18 at 16:02









                Thomas Ward♦

                41k23112166




                41k23112166










                answered May 18 at 16:00









                aregowe

                113




                113






















                     

                    draft saved


                    draft discarded


























                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1037818%2fnginx-test-failed-service-not-starting%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Popular posts from this blog

                    pylint3 and pip3 broken

                    Missing snmpget and snmpwalk

                    How to enroll fingerprints to Ubuntu 17.10 with VFS491