Server State Overview reports web service offline

Discussion in 'ISPConfig 3 Priority Support' started by drewb0y, May 14, 2014.

  1. drewb0y

    drewb0y Member

    Resolved: Server State Overview reports web service offline

    I have a new server setup using nginx and debian wheezy. It is showing the web server service offline, even though it is actually online.

    I suspect this may have to do with my IP address configuration. There are two IP addresses set up on the machine.

    Both are in /etc/network/interfaces

    # This configuration file is auto-generated.
    # WARNING: Do not edit this file, your changes will be lost.
    # Please create/edit /etc/network/interfaces.head and
    # /etc/network/interfaces.tail instead, their contents will be
    # inserted at the beginning and at the end of this file, respectively.
    # NOTE: it is NOT guaranteed that the contents of /etc/network/interfaces.tail
    # will be at the very end of this file.
    # Auto generated lo interface
    auto lo
    iface lo inet loopback
    # Auto generated venet0 interface
    auto venet0
    iface venet0 inet manual
            up ifconfig venet0 up
            up ifconfig venet0
            up route add default dev venet0
            down route del default dev venet0
            down ifconfig venet0 down
    auto venet0:0
    iface venet0:0 inet static
            address aaa.bbb.ccc.19
    auto venet0:1
    iface venet0:1 inet static
            address aaa.bbb.ccc.195
    Only the main IP is in /etc/hosts

    Code: localhost.localdomain localhost
    # Auto-generated hostname. Please do not remove this comment.
    aaa.bbb.ccc.19  web
    ::1 localhost
    (I changed the first numbers of the IP to letters in this post for security reasons)

    In the ISPConfig interface under System > Server IP Addresses I only have the main IP entered. I did have both and removed the second to see if it would fix the issue.

    What is the proper way this should be setup for the service monitoring to work properly? On the initial setup, there was nothing in System > Server IP Addresses. It is only when I added them that the error occured.

    Please let me know if further information such as log files or nginx config is needed. (and where they are located)

    Thanks in advance.

    Attached Files:

    Last edited: May 15, 2014
  2. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    Doesn't your webserver listen on localhost?
    ISPConfig monitor connects to localhost for port check.
  3. drewb0y

    drewb0y Member

    Got it

    Looks like that was the key. I was trying to fix an issue with the server displaying a specific client web page as default when going to the server IP address in a browser. One of the posts here suggested editing the vhost files and changing the
    listen *:80;
    to the specific IP address of the server. Of course I also did that to the default file as well in /etc/nginx/sites-available

    So I edited all of my vhost files and added localhost and they now have
    server {
    restarted nginx using
    service nginx restart
    and now
    netstat -tapn |grep nginx
    results in
    tcp        0      0  *               LISTEN      3659/nginx      
    tcp        0      0  *               LISTEN      3659/nginx      
    tcp        0      0*               LISTEN      3659/nginx      
    tcp        0      0  *               LISTEN      3659/nginx 
    Logged back in to ISPConfig interface and now it shows to be back online again!

    This post was also helpful in troubleshooting.
    Last edited: May 15, 2014
  4. drewb0y

    drewb0y Member

    The original issue of having the server default web page by IP address puling up a specific client page instead of using the default is still unresolved however. But I will continue with that in my other thread.
  5. drewb0y

    drewb0y Member

    Another interesting note: By default when you create a site it is set to listen to *
    Which works great because it also includes localhost.
    If you change the site to select a specific IP address in the interface, it changes the vhost file to only be listening to that IP address and not localhost anymore.
    Like below
           server {
    If you change all of the sites to a specific address, and then restart nginx, it is no longer listening to port 80 on localhost, and thus the service offline error.

    Maybe the code can be changed so that when you specify an IP address for a site, it will also still include localhost in the vhost file.

Share This Page