Results 1 to 11 of 11

Thread: installed kali 2.0 Now Apache webserver will not start

  1. #1
    Join Date
    2015-Nov
    Posts
    9

    installed kali 2.0 Now Apache webserver will not start

    I did an upgrade to Kali 2.0 and after that apache fails we start with following errors:

    Service apache2 start
    Error

    Code:
    Job for apache2.service failed. See 'systemctl status apache2.service' and 'journalctl -xn' for details.
    systemctl status apache2.service
    error:

    Code:
    ● apache2.service - LSB: Apache2 web server
       Loaded: loaded (/etc/init.d/apache2)
       Active: failed (Result: exit-code) since Thu 2015-11-19 20:15:50 WAT; 1min 52s ago
      Process: 8298 ExecStart=/etc/init.d/apache2 start (code=exited, status=1/FAILURE)
    
    Nov 19 20:15:50 Brun0L3z apache2[8298]: Starting web server: apache2 failed!
    Nov 19 20:15:50 Brun0L3z apache2[8298]: The apache2 configtest failed. ... (warning).
    Nov 19 20:15:50 Brun0L3z apache2[8298]: Output of config test was:
    Nov 19 20:15:50 Brun0L3z apache2[8298]: apache2: Syntax error on line 244 of /etc/apache2/apache2.conf: Syntax error ...ectory
    Nov 19 20:15:50 Brun0L3z apache2[8298]: Action 'configtest' failed.
    Nov 19 20:15:50 Brun0L3z apache2[8298]: The Apache error log may have more information.
    Nov 19 20:15:50 Brun0L3z systemd[1]: apache2.service: control process exited, code=exited status=1
    Nov 19 20:15:50 Brun0L3z systemd[1]: Failed to start LSB: Apache2 web server.
    Nov 19 20:15:50 Brun0L3z systemd[1]: Unit apache2.service entered failed state.
    Hint: Some lines were ellipsized, use -l to show in full.
    running 'journalctl -xn yields following info:

    Code:
    -- Logs begin at Thu 2015-11-19 18:35:59 WAT, end at Thu 2015-11-19 20:25:18 WAT. --
    Nov 19 20:24:38 Brun0L3z systemd[1]: Unit bumblebeed.service entered failed state.
    Nov 19 20:24:44 Brun0L3z gnome-session[2507]: (gnome-shell:2634): mutter-WARNING **: STACK_OP_RAISE_ABOVE: window 0x6d01600016
    Nov 19 20:25:17 Brun0L3z gnome-session[2507]: (gnome-shell:2634): mutter-WARNING **: STACK_OP_RAISE_ABOVE: window 0x6d01600016
    Nov 19 20:25:17 Brun0L3z gnome-session[2507]: (gnome-shell:2634): mutter-WARNING **: STACK_OP_RAISE_ABOVE: window 0x6d01600016
    Nov 19 20:25:17 Brun0L3z gnome-session[2507]: (gnome-shell:2634): mutter-WARNING **: STACK_OP_RAISE_ABOVE: window 0x6d01600016
    Nov 19 20:25:17 Brun0L3z gnome-session[2507]: (gnome-shell:2634): mutter-WARNING **: STACK_OP_RAISE_ABOVE: window 0x6d01600016
    Nov 19 20:25:17 Brun0L3z gnome-session[2507]: (gnome-shell:2634): mutter-WARNING **: STACK_OP_RAISE_ABOVE: window 0x6d01600016
    Nov 19 20:25:17 Brun0L3z gnome-session[2507]: (gnome-shell:2634): mutter-WARNING **: STACK_OP_RAISE_ABOVE: window 0x6d01600016
    Nov 19 20:25:18 Brun0L3z gnome-session[2507]: (gnome-shell:2634): mutter-WARNING **: STACK_OP_RAISE_ABOVE: window 0x6d01600016
    Nov 19 20:25:18 Brun0L3z gnome-session[2507]: (gnome-shell:2634): mutter-WARNING **: STACK_OP_RAISE_ABOVE: window 0x6d01600016
    lines 1-11/11 (END)
    Please help, I am stuck

  2. #2
    Join Date
    2015-Oct
    Location
    Switzerland
    Posts
    33
    Hi there

    ● apache2.service - LSB: Apache2 web server
    Loaded: loaded (/etc/init.d/apache2)
    Active: failed (Result: exit-code) since Thu 2015-11-19 20:15:50 WAT; 1min 52s ago
    Process: 8298 ExecStart=/etc/init.d/apache2 start (code=exited, status=1/FAILURE)

    Nov 19 20:15:50 Brun0L3z apache2[8298]: Starting web server: apache2 failed!
    Nov 19 20:15:50 Brun0L3z apache2[8298]: The apache2 configtest failed. ... (warning).
    Nov 19 20:15:50 Brun0L3z apache2[8298]: Output of config test was:
    Nov 19 20:15:50 Brun0L3z apache2[8298]: apache2: Syntax error on line 244 of /etc/apache2/apache2.conf: Syntax error ...ectory
    Nov 19 20:15:50 Brun0L3z apache2[8298]: Action 'configtest' failed.
    Nov 19 20:15:50 Brun0L3z apache2[8298]: The Apache error log may have more information.
    Nov 19 20:15:50 Brun0L3z systemd[1]: apache2.service: control process exited, code=exited status=1
    Nov 19 20:15:50 Brun0L3z systemd[1]: Failed to start LSB: Apache2 web server.
    Nov 19 20:15:50 Brun0L3z systemd[1]: Unit apache2.service entered failed state.
    Hint: Some lines were ellipsized, use -l to show in full.
    Due to this, there is an error in your /etc/apache2/apache2.conf on line 244. Could you cat this line please?
    What did you change in this file?

    regards, reidamaxia

  3. #3
    Join Date
    2015-Nov
    Posts
    9

    Found the Lines

    Quote Originally Posted by reidamaxia View Post
    Hi there



    Due to this, there is an error in your /etc/apache2/apache2.conf on line 244. Could you cat this line please?
    What did you change in this file?

    regards, reidamaxia

    Here are the lines you requested:

    Code:
    243 # Include module configuration:
    244 Include mods-enabled/*.load
    245 Include mods-enabled/*.conf
    Thanks

  4. #4
    Join Date
    2015-Oct
    Location
    Switzerland
    Posts
    33
    Hi Burn0L3z

    I got the reason: I am pretty sure you do not have a folder in /etc/apache2/ named mods-enabled.. am I right?
    Do you see the end of your cat line? It is like "directory"..
    Nov 19 20:15:50 Brun0L3z apache2[8298]: apache2: Syntax error on line 244 of /etc/apache2/apache2.conf: Syntax error ...ectory
    I removed this folder from my system and tried to run apache --> error --> cat the log --> Same output line with "directory" at the end..
    root@kali:/etc/apache2# systemctl status apache2.service
    ● apache2.service - LSB: Apache2 web server
    Loaded: loaded (/etc/init.d/apache2)
    Active: failed (Result: exit-code) since Fri 2015-11-20 11:21:01 CET; 35s ago
    Process: 3913 ExecStart=/etc/init.d/apache2 start (code=exited, status=1/FAILURE)

    Nov 20 11:21:01 kali apache2[3913]: Starting web server: apache2 failed!
    Nov 20 11:21:01 kali apache2[3913]: The apache2 configtest failed. ... (warning).
    Nov 20 11:21:01 kali apache2[3913]: Output of config test was:
    Nov 20 11:21:01 kali apache2[3913]: apache2: Syntax error on line 140 of /etc/apache2/apache2.conf: Could not open config directory /etc/apache2/mods-enabled: No such file or directory
    If the folder exists:
    Have a look again at the error.log of apache2. If the full path is not right, try to write the correct path into your apache2.conf:
    root@kali:~/Downloads# cat apache2.conf | grep mods-enabled
    Include /etc/apache2/mods-enabled/*.load
    Include /etc/apache2/mods-enabled/*.conf
    regards, reidamaxia

  5. #5
    Join Date
    2015-Nov
    Posts
    9

    Seems the Directory exists

    Quote Originally Posted by reidamaxia View Post
    Hi Burn0L3z

    I got the reason: I am pretty sure you do not have a folder in /etc/apache2/ named mods-enabled.. am I right?
    Do you see the end of your cat line? It is like "directory"..


    I removed this folder from my system and tried to run apache --> error --> cat the log --> Same output line with "directory" at the end..


    If the folder exists:
    Have a look again at the error.log of apache2. If the full path is not right, try to write the correct path into your apache2.conf:


    regards, reidamaxia
    My /etc/apache2/ looks like this:

    apache2.conf conf-available envvars mods-available ports.conf sites-enabled
    apache2.conf.dpkg-dist conf-enabled magic mods-enabled sites-available

  6. #6
    Join Date
    2015-Oct
    Location
    Switzerland
    Posts
    33
    Hi Brun0L3z

    I'm sorry for my late answer, I have had a lot to do.

    OK, the folders look all good!
    I cat my own apache2.conf and did some research due to the output --> found this https://www.digitalocean.com/communi...-to-2-4-syntax
    A short summary for you: "Include" can cause problems so you might try "IncludeOptional". Thats also how my actual apache2.conf file looks:
    root@kali:~# cat /etc/apache2/apache2.conf | grep mods-enabled
    # |-- mods-enabled
    # * Configuration files in the mods-enabled/, conf-enabled/ and sites-enabled/
    IncludeOptional mods-enabled/*.load
    IncludeOptional mods-enabled/*.conf
    Otherwise, as i mentioned above, try to write the full path (/etc/apache2/mods-enabled/*.load or *.conf) into your apache2.conf.

    If both do not work, please cat your error output again, but please the full line and not like in your first post with "..."!

    regards, reidamaxia
    Last edited by reidamaxia; 2015-11-24 at 06:40. Reason: line --> post

  7. #7
    Join Date
    2015-Nov
    Posts
    9

    Did not work either

    I HAVE TRIED ALL YOUR SUGGESTIONS AND STILL COULD NOT MAKE APACHE WORK, I EVEN DID A REINSTALL BUT NO SUCESS,

    ITS GETTING ME FRUSTRATED ALREADY

    Need help PLEASE!!

    Quote Originally Posted by reidamaxia View Post
    Hi Brun0L3z

    I'm sorry for my late answer, I have had a lot to do.

    OK, the folders look all good!
    I cat my own apache2.conf and did some research due to the output --> found this https://www.digitalocean.com/communi...-to-2-4-syntax
    A short summary for you: "Include" can cause problems so you might try "IncludeOptional". Thats also how my actual apache2.conf file looks:

    Otherwise, as i mentioned above, try to write the full path (/etc/apache2/mods-enabled/*.load or *.conf) into your apache2.conf.

    If both do not work, please cat your error output again, but please the full line and not like in your first post with "..."!

    regards, reidamaxia

  8. #8
    Join Date
    2015-Nov
    Posts
    9
    I ran this command and it seems to bring out better information:

    apachectl start
    apache2: Syntax error on line 244 of /etc/apache2/apache2.conf: Syntax error on line 1 of /etc/apache2/mods-enabled/php5.load: Cannot load /usr/lib/apache2/modules/libphp5.so into server: /usr/lib/apache2/modules/libphp5.so: cannot open shared object file: No such file or directory
    Action 'start' failed.
    The Apache error log may have more information.
    Will update as i get more information, meanwhile any help will be appreciated

  9. #9
    Join Date
    2015-Nov
    Posts
    9

    Post Solved!!!!!!!!!!!!!!!!!!!!!

    I have been able to solve this issue by running three simple well known commands.

    1- I did
    HTML Code:
    apt-get purge apache2
    (This will remove apache2 with all its files)
    2- I then did
    HTML Code:
    apt-get update && apt-get dist-upgrade
    (This will update and upgrade system)
    3- Lastly I did
    HTML Code:
    sudo apt-get install apache2 apache2-doc apache2-utils
    (this installed apache2 and setup everything

    working again perfectly
    Thanks for all your support

  10. #10
    Join Date
    2015-Oct
    Location
    Switzerland
    Posts
    33
    Hi Bun0L3z

    Sure this is a variant too But if you would have done a lot of configs and would make them again now, you might run into the problem again..

    No Problem! Enjoy your working Apache!

    regards, reidamaxia

  11. #11
    Join Date
    2016-Mar
    Posts
    1
    Hi all. Had the same problem. Turned out that the reason was that openvas-manager was running, which does not go well with each other.

Similar Threads

  1. Replies: 4
    Last Post: 2017-04-03, 04:28
  2. N7 2012 - not seeing Start/Stop Webserver options in launcher
    By factgasm in forum NetHunter General Questions
    Replies: 9
    Last Post: 2015-02-15, 19:45
  3. Start Webserver Not Working
    By seag33k in forum NetHunter General Questions
    Replies: 1
    Last Post: 2014-09-30, 23:33

Posting Permissions

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