Results 1 to 4 of 4

Thread: Apache won't start

  1. #1

    Apache won't start

    Hello - I'm fairly new to Linux and Ubuntu, and I'm trying to run a webserver using Apache.

    I updated some virtual host files, and did a sudo /etc/init.d/apache2 reload in order to try out my changes, but found that nothing came up at all when I tried to visit my site.

    Then I did a sudo /etc/init.d/apache2 restart and got:
    * Restarting web server apache2 httpd (pid 23569?) not running
    [fail]

    After searching a bit, I decided to stop apache, delete /var/run/apache2.pid and start it up again. So, that went:

    sudo /etc/init.d/apache2 stop
    * Stopping web server apache2 httpd (pid 23569?) not running
    [ OK ]

    sudo rm /var/run/apache2.pid

    sudo /etc/init.d/apache2 start
    * Starting web server apache2 [fail]

    Just a fail, no error message or anything. I tried it without the sudo, to see what kind of error message I'd get, and I got:

    /etc/init.d/apache2 start
    * Starting web server apache2 (13)Permission denied: make_sock: could not bind to address 0.0.0.0:80
    no listening sockets available, shutting down
    Unable to open logs
    [fail]

    And since then, nothing I've tried is working:

    sudo /etc/init.d/apache2 start
    * Starting web server apache2 [fail]

    sudo /etc/init.d/apache2 restart
    * Restarting web server apache2 httpd (no pid file) not running
    [fail]


    I don't know what I'm supposed to do if I don't even get an error message. Can anyone tell me what I should do next?

    Thanks

  2. #2
    Join Date
    May 2007
    Location
    NY's first capital
    Beans
    2,692
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Apache won't start

    Check logs.

    Code:
    cat /var/log/apache2/error.log
    If the problem occurred after modify of vhosts, I would disable all sites, except the default. Then try to start apache.
    Nothing is ever easy, but if it is difficult you must be doing it wrong.

  3. #3
    MountainX's Avatar
    MountainX is offline Iced Blended Vanilla Crème Ubuntu
    Join Date
    Jan 2008
    Location
    A place with no mountains
    Beans
    1,610
    Distro
    Kubuntu

    Re: Apache won't start

    I'm having the same issue. Regarding the proposed solution:

    cat /var/log/apache2/error.log
    Checking the logs doesn't work. Part of the error message is "Unable to open logs"

  4. #4
    Join Date
    Dec 2010
    Beans
    1

    Re: Apache won't start

    Quote Originally Posted by MountainX View Post
    I'm having the same issue. Regarding the proposed solution:



    Checking the logs doesn't work. Part of the error message is "Unable to open logs"
    No, apache can't open log specified for host.

    Try to craete dirs specified in
    Code:
        ErrorLog logs/baikal.error_log
        TransferLog logs/baikal.access_log
    apache started after I created dir
    Code:
    /etc/apache2/logs
    with my virtualhost
    Code:
    <VirtualHost *:80>
    
        ServerName baikal
    
        DocumentRoot /var/www/baikal
    
        ErrorLog logs/baikal.error_log
        TransferLog logs/baikal.access_log
        LogLevel warn
    
        <Directory "/var/www/baikal">
          Order allow,deny
          Allow from all
        </Directory>
    
    </VirtualHost>

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •