Apache doesn't start after ISPConfig installed

Discussion in 'ISPConfig 3 Priority Support' started by jsj, Jul 1, 2014.

  1. jsj

    jsj New Member

    using: The Perfect Server - Ubuntu 14.04 (Apache2, PHP, MySQL, PureFTPD, BIND, Dovecot, ISPConfig 3)

    After step 21 I was able to access squirrelmail over the web interface, so I know that apache was running at that point. At step 22 I ran the test script and saw:

    root@machine:/tmp# ./ubuntu_package_check.sh
    You missed to install these packages
    php-auth
    php-pear
    You need to install these packages. To install these packages you need to run the command apt-get install package_name
    You can cross check the particular installation as follows:
    dpkg -l | grep package_name | cut -d ' ' -f3

    If it is showing the package_name then you can ignore the package.
    root@machine:/tmp# dpkg -l | grep package_name | cut -d ' ' -f3
    root@machine:/tmp#

    I attempted to use aptitude to install php-auth and php-pear anyway, but the system showed that they were already installed, so I continued to step 23, which is where ISPConfig is installed. After installing ISPConfig, I am no longer able to start apache.

    name@machine:~$ sudo service apache2 reload
    * Reloading web server apache2 *
    * The apache2 configtest failed. Not doing anything.
    Output of config test was:
    AH00548: NameVirtualHost has no effect and will be removed in the next release /etc/apache2/sites-enabled/000-ispconfig.conf:61
    AH00526: Syntax error on line 18 of /etc/apache2/sites-enabled/000-ispconfig.vhost:
    Invalid command 'SuexecUserGroup', perhaps misspelled or defined by a module not included in the server configuration
    Action 'configtest' failed.
    The Apache error log may have more information.
    name@machine:~$

    Just to be sure, I used aptitude to check on the status of php-auth and php-pear and found that php-auth-http ws not installed:

    name@machine:~$ sudo aptitude search php-auth php-pear
    i php-auth - Creating an authentication system
    p php-auth-http - HTTP authentication
    i A php-auth-sasl - Abstraction of various SASL mechanism responses
    i php-pear - PEAR - PHP Extension and Application Repository
    name@machine:~$
    after which I installed it, but apache still won't start.

    After grepping through /etc/apache2/sites-enabled, I found that there are actually two files that contain SuexecUserGroup: 000-apps.vhost and 000-ispconfig.vhost.

    Any idea why apache won't load after ISPConfig was installed?

    jsj
     
  2. srijan

    srijan New Member HowtoForge Supporter

    Its OK, both packages are installed.

    Please paste your apache2 error log file
     
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    The suexec module is not enabled. Please rerun the following command from the tutorial:

    Code:
    a2enmod suexec rewrite ssl actions include cgi
    and then start apache.
     
  4. jsj

    jsj New Member

    Okay, I ran

    a2enmod suexec rewrite ssl actions include cgi
    a2enmod dav_fs dav auth_digest
    a2enmod actions fastcgi alias
    rebooted, and tried to start apache again. It looks like it can't find an interface to bind to, which makes sense since I configured apache to start on 192.168.1.250 rather than 0.0.0.0, and turned off the ipv6 interface entirely:

    name@machine:~$ sudo service apache2 start
    * Starting web server apache2 AH00548: NameVirtualHost has no effect and will be removed in the next release /etc/apache2/sites-enabled/000-ispconfig.conf:61
    (98)Address already in use: AH00072: make_sock: could not bind to address [::]:443
    (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:443
    no listening sockets available, shutting down
    AH00015: Unable to open logs
    Action 'start' failed.
    The Apache error log may have more information.
    *
    * The apache2 instance did not start within 20 seconds. Please read the log files to discover problems
    name@machine:~$
    Here are the changes that have been made to apache2.conf since it was originally installed in step 14:

    name@machine:/etc/apache2$ diff apache2.conf.original apache2.conf
    70a71,74
    > # Specify the server name. Otherwise, it gets the localhost IP
    > # address (or 127.0.1.1) by default.
    > ServerName 192.168.1.250
    >
    219c223
    < IncludeOptional sites-enabled/*.conf
    ---
    > IncludeOptional sites-enabled/
    name@machine:/etc/apache2$
    and to ports.conf:

    name@machine:/etc/apache2$ diff ports.conf.original ports.conf
    5c5,6
    < Listen 80
    ---
    > Listen 192.168.1.250:80
    > Listen 192.168.1.250:8080
    8c9
    < Listen 443
    ---
    > Listen 192.168.1.250:443
    12c13
    < Listen 443
    ---
    > Listen 192.168.1.250:443
    15a17,19
    > Listen 443
    > # NameVirtualHost *:80
    > # NameVirtualHost *:443
    name@machine:/etc/apache2$
    Assuming that's the problem, how can I configure ISPConfig to listen on a single IPv4 address rather than on all addresses?

    JSJ
     
  5. jsj

    jsj New Member

    Neither the error log nor the access log shows any activity since apache was last shut down on Sunday. Here's the error log:

    name@machine:/var/log/apache2$ tail error.log.1·
    [Fri Jun 27 23:46:26.206707 2014] [:notice] [pid 18967] mod_python: using mutex_directory /tmp·
    [Fri Jun 27 23:46:26.234310 2014] [mpm_prefork:notice] [pid 18967] AH00163: Apache/2.4.7 (Ubuntu) mod_fastcgi/mod_fastcgi-SNAP-0910052141 mod_fcgid/2.3.9 PHP/5.5.9-1ubuntu4.2 mod_python/3.3.1 Python/2.7.6 configured -- resuming normal operations
    [Fri Jun 27 23:46:26.234404 2014] [core:notice] [pid 18967] AH00094: Command line: '/usr/sbin/apache2'
    [Sat Jun 28 22:25:39.258839 2014] [mpm_prefork:notice] [pid 18967] AH00169: caught SIGTERM, shutting down
    [Sat Jun 28 22:28:04.188222 2014] [:notice] [pid 2184] FastCGI: process manager initialized (pid 2184)
    [Sat Jun 28 22:28:04.419236 2014] [:notice] [pid 2182] mod_python: Creating 8 session mutexes based on 150 max processes and 0 max threads.
    [Sat Jun 28 22:28:04.419316 2014] [:notice] [pid 2182] mod_python: using mutex_directory /tmp·
    [Sat Jun 28 22:28:04.486307 2014] [mpm_prefork:notice] [pid 2182] AH00163: Apache/2.4.7 (Ubuntu) mod_fastcgi/mod_fastcgi-SNAP-0910052141 mod_fcgid/2.3.9 PHP/5.5.9-1ubuntu4.2 mod_python/3.3.1 Python/2.7.6 configured -- resuming normal operations
    [Sat Jun 28 22:28:04.486469 2014] [core:notice] [pid 2182] AH00094: Command line: '/usr/sbin/apache2'
    [Sun Jun 29 01:16:40.968720 2014] [mpm_prefork:notice] [pid 2182] AH00169: caught SIGTERM, shutting down
    name@machine:/var/log/apache2$·
    and here's the access log:

    name@machine:/var/log/apache2$ tail access.log.1
    192.168.1.175 - - [21/Jun/2014:21:32:51 -0400] "GET /webmail/images/sm_logo.png HTTP/1.1" 200 7084 "http://machine.state.home/webmail/src/login.php" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:30.0) Gecko/20100101 Firefox/30.0"
    192.168.1.175 - - [21/Jun/2014:21:33:11 -0400] "POST /webmail/src/redirect.php HTTP/1.1" 200 2077 "http://machine.state.home/webmail/src/login.php" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:30.0) Gecko/20100101 Firefox/30.0"
    192.168.1.175 - - [21/Jun/2014:21:33:23 -0400] "GET /webmail/src/login.php HTTP/1.1" 200 2238 "http://machine.state.home/webmail/src/redirect.php" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:30.0) Gecko/20100101 Firefox/30.0"
    192.168.1.175 - - [21/Jun/2014:21:33:32 -0400] "POST /webmail/src/redirect.php HTTP/1.1" 200 2077 "http://machine.state.home/webmail/src/login.php" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:30.0) Gecko/20100101 Firefox/30.0"
    192.168.1.175 - - [21/Jun/2014:21:33:50 -0400] "GET /webmail/src/login.php HTTP/1.1" 200 2238 "http://machine.state.home/webmail/src/redirect.php" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:30.0) Gecko/20100101 Firefox/30.0"
    192.168.1.175 - - [21/Jun/2014:21:33:59 -0400] "GET /webmail/src/login.php HTTP/1.1" 200 2238 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:30.0) Gecko/20100101 Firefox/30.0"
    192.168.1.175 - - [21/Jun/2014:21:47:43 -0400] "GET /webmail/src/login.php HTTP/1.1" 200 1952 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:30.0) Gecko/20100101 Firefox/30.0"
    192.168.1.175 - - [21/Jun/2014:21:47:43 -0400] "GET /webmail/images/sm_logo.png HTTP/1.1" 200 7084 "http://machine.state.home/webmail/src/login.php" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:30.0) Gecko/20100101 Firefox/30.0"
    192.168.1.175 - - [21/Jun/2014:21:47:44 -0400] "GET / HTTP/1.1" 200 3593 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:30.0) Gecko/20100101 Firefox/30.0"
    192.168.1.175 - - [21/Jun/2014:21:47:44 -0400] "GET /icons/ubuntu-logo.png HTTP/1.1" 200 3688 "http://machine.state.home/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:30.0) Gecko/20100101 Firefox/30.0"
    name@machine:/var/log/apache2$
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    The problem here is not ispconfig as ispconfig listens on port 8080 and not 443. The problem seems to be a inconsistency in your manual apache changes. chek the apache config and change the "Listen 443" to "Listen 192.168.1.250:443" as well.
     
  7. jsj

    jsj New Member

    Good catch, but that still didn't do the trick. Now it says it can't bind to 192.168.1.250 rather than 0.0.0.0, and it no longer tries to bind to any IPv6 address:

    name@machine:/etc/apache2$ sudo service apache2 start
    * Starting web server apache2 AH00548: NameVirtualHost has no effect and will be removed in the next release /etc/apache2/sites-enabled/000-ispconfig.conf:61
    (98)Address already in use: AH00072: make_sock: could not bind to address 192.168.1.250:443
    no listening sockets available, shutting down
    AH00015: Unable to open logs
    Action 'start' failed.
    The Apache error log may have more information.

    * The apache2 instance did not start within 20 seconds. Please read the log files to discover problems
    name@machine:/etc/apache2$·
    However, I grepped for other Listen directives and found one in sites-available/apps.vhost and another in sites-available/ispconfig.vhost. I changed both of these to 192.168.1.250:808[01] and restarted the machine.

    Hmm. That didn't work either - apache still won't start.

    Also, I looked in the log files again but there still isn't anything there.
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    Why do you want to bind apache to this ip at all, does not make much sense for a hosting server and some functions in ispconfig will fail and the server monitor will show your system as offline as it is requird that the system listens at least to 127.0.0.1 and the public interface.
     
  9. jsj

    jsj New Member

    localhost I get, but I don't want to stand up a web server on an interface where it shouldn't be accessed. It's poor security practice to have a service listening on an interface where it has no purpose.

    Please accept that it's entirely reasonable for me to want to configure apache to only listen on specific interfaces.
     
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    Thats absolutely ok, but you should accept then as well that ispconfig will be only working partially on your server. Some of the webserver settings, the network and IP configuration options will not work then.

    Back to your original problem, please post the output of:

    netstat -ntap
     

Share This Page