Can't get longview apache to work

Hi There,

I am pretty new to all this hosting stuff but I like a challenge :) So far I managed to install and configure Ubuntu LAMP with name based virtual hosts and host a couple of websites. Very happy with results!

I was playing around with longview but noticed I couldn't get data from Apache, all the other tabs worked:

> Unable to access local server status for Apache at http://127.0.0.1/server-status?auto: 404 Not Found

Apache status module has been enabled

Then I had to edit status.config: sudo nano /etc/apache2/mods-available/status.conf

 <ifmodule mod_status.c="">ExtendedStatus On
 <location server-status="">SetHandler server-status
    Order deny,allow
    Deny from all
    Allow from 127.0.01
#  Allow from .example.com</location></ifmodule> 

After that I made sure this file had to right code: /etc/linode/longview.d/Apache.conf

> location <http://127.0.0.1/server-status?auto>

Still same error. Am I doing something wrong here? Probably missing something obvious ;) Hope someone can help me out here.

Thanks

7 Replies

Did you restart Apache after making the configuration changes? The 404 error means that Apache doesn't know what to return when /server-status is requested.

Also, the Allow from line needs to say 127.0.0.1, not 127.0.01 - this would cause a 403 Forbidden error.

Sorry for not responding, I was on a (well deserved holiday). The 127.0.01 was a typo in my post. In status.config it's 127.0.0.1. I did restart apache.

Weirdest thing: I just got home and checked longview. Every single tab gives me a connection error right now. I think the only thing I did change before I went away was change the firewall settings. I used this document and I just double checked but I entered everything as stated (also the longview exception):

https://www.linode.com/docs/security/se … a-firewall">https://www.linode.com/docs/security/securing-your-server#creating-a-firewall

Wondering why I am getting these connection errors all of a sudden :-/

What do your Apache logs say?

The errors are gone now it says Waiting… :?

Log gives indication why but I can't figure out where I went wrong.

01/28 17:08:02 ERROR Longview[2405] - Unable to access local server status for Apache at http://127.0.0.1/server-status?auto: 404 Not Found
01/28 17:08:02 INFO Longview[2405] - 502 Bad Gateway
01/28 17:08:02 INFO Longview[2405] - 
<title>502 Bad Gateway</title>

<center>

# 502 Bad Gateway

</center>

* * *

<center>nginx</center>

01/28 17:09:03 ERROR Longview[2405] - Unable to access local server status for Apache at http://127.0.0.1/server-status?auto: 404 Not Found
01/28 17:09:41 ERROR Longview[2405] - Unable to access local server status for Apache at http://127.0.0.1/server-status?auto: 404 Not Found
01/28 17:09:48 LOGDIE Longview[2405] - Server has requested this API Key stop sending data
01/28 17:09:48 WARN Longview[2405] - Server has requested this API Key stop sending data at /opt/linode/longview/Linode/..//Linode/Longview/Logger.pm line 32.

I deleted the client, created a new one, updated key an now it works again…still no apache though

I had a similar problem when setting up a new Ubuntu 14.04 LTS Linode recently. I can't remember what I had to add to the status.conf file to get Longview to monitor Apache, but here's my status.conf file in full:

 <ifmodule mod_status.c=""># Allow server status reports generated by mod_status,
    # with the URL of http://servername/server-status
    # Uncomment and change the "192.0.2.0/24" to allow access from other hosts.
    ExtendedStatus On
    Listen 127.0.0.1:8081
     <location server-status="">SetHandler server-status
        Require local
        Require ip 127.0.0.1</location> 

    # Determine if mod_status displays the first 63 characters of a request or
    # the last 63, assuming the request itself is greater than 63 chars.
    # Default: Off
    #SeeRequestTail On

     <ifmodule mod_proxy.c=""># Show Proxy LoadBalancer status in mod_status
        ProxyStatus On</ifmodule></ifmodule> 

It may've been the 'Listen 127.0.0.1:8081' line that needed to be added. Bear in mind that Ubuntu 14.04 LTS comes with Apache 2.4, which uses different syntax for deny/allow etc, although I believe the old syntax from 2.2 will still work.

Thanks! Tried it but unfortunately didn't work for me :(

@barth:

01/28 17:08:02 ERROR Longview[2405] - Unable to access local server status for Apache at http://127.0.0.1/server-status?auto: 404 Not Found
01/28 17:08:02 INFO Longview[2405] - 502 Bad Gateway
01/28 17:08:02 INFO Longview[2405] - 
<title>502 Bad Gateway</title>

<center>

# 502 Bad Gateway

</center>

* * *

<center>nginx</center>

According to this, you're running nginx, not Apache.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct