Announcement

Collapse
No announcement yet.

Cant restart nginx and apache2

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Cant restart nginx and apache2

    I am pretty new at this and have to do this for class. Please help

    * Restarting nginx nginx [fail]

    * Restarting web server apache2 (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80
    (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
    no listening sockets available, shutting down
    AH00015: Unable to open logs
    Action 'start' failed.
    The Apache error log may have more information.

    How should I proceed next?

    #2
    This might be helpful: https://www.digitalocean.com/communi...x-restart-fail
    Windows no longer obstructs my view.
    Using Kubuntu Linux since March 23, 2007.
    "It is a capital mistake to theorize before one has data." - Sherlock Holmes

    Comment


      #3
      Originally posted by Snowhog View Post
      Thanks, I did what they suggested there for nginx. But apache2 is still giving me the same error.

      prodip@ubuntu:~$ sudo nginx -t
      nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
      nginx: configuration file /etc/nginx/nginx.conf test is successful
      prodip@ubuntu:~$ sudo fuser -k 80/tcp
      80/tcp: 23484
      prodip@ubuntu:~$ sudo kill -9 23484
      prodip@ubuntu:~$ sudo fuser -k 80/tcp
      prodip@ubuntu:~$ sudo service nginx restart
      * Restarting nginx nginx [ OK ]

      Comment


        #4
        How did you install apache? How did you try to start it? Also, you only need one server. Trying to run both Apache and nginx at the same time could be causing problems.

        Comment


          #5
          I realize that's the problem. It is all part of tutorials at my linux class. In the previous tutorials, I was tasked to setup nginx. The current one wants me to run a apache2 server. I finally did a service nginx stop and was able to complete the tutorial.

          Is "service service-name stop" a permanent process or do I have to run that command every time I start my system to stop either of apache or nginx?

          Comment


            #6
            It depends. If your servers start on boot, then yes, you would have to stop them every time. You can easily check the status of a service by running
            Code:
            sudo service <service-name> status
            So for apache:
            Code:
            sudo service apache2 status

            Comment

            Working...
            X