Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Mon Jan 19, 2015 2:06 pm 
Offline
Senior Newbie

Joined: Mon Jan 19, 2015 1:52 pm
Posts: 5
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:


Quote:
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

Code:
<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

Quote:
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


Top
   
PostPosted: Wed Jan 21, 2015 9:19 pm 
Offline
Senior Member
User avatar

Joined: Sun Jan 18, 2009 2:41 pm
Posts: 830
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.


Top
   
PostPosted: Wed Jan 28, 2015 6:03 pm 
Offline
Senior Newbie

Joined: Mon Jan 19, 2015 1:52 pm
Posts: 5
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

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


Top
   
PostPosted: Thu Jan 29, 2015 2:42 am 
Offline
Senior Member
User avatar

Joined: Sun Jan 18, 2009 2:41 pm
Posts: 830
What do your Apache logs say?


Top
   
PostPosted: Thu Jan 29, 2015 3:23 am 
Offline
Senior Newbie

Joined: Mon Jan 19, 2015 1:52 pm
Posts: 5
The errors are gone now it says Waiting... :?

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

Code:
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] - <html>
<head><title>502 Bad Gateway</title></head>
<body bgcolor="white">
<center><h1>502 Bad Gateway</h1></center>
<hr><center>nginx</center>
</body>
</html>

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


Top
   
PostPosted: Fri Jan 30, 2015 11:20 am 
Offline
Junior Member

Joined: Fri Nov 01, 2013 8:16 am
Posts: 21
Website: http://purbeckpixels.com
Location: England
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:

Code:
<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.


Top
   
PostPosted: Wed Feb 04, 2015 3:02 pm 
Offline
Senior Newbie

Joined: Mon Jan 19, 2015 1:52 pm
Posts: 5
Thanks! Tried it but unfortunately didn't work for me :(


Top
   
PostPosted: Sat Feb 07, 2015 8:20 pm 
Offline
Senior Member
User avatar

Joined: Sun Jan 18, 2009 2:41 pm
Posts: 830
barth wrote:
Code:
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] - <html>
<head><title>502 Bad Gateway</title></head>
<body bgcolor="white">
<center><h1>502 Bad Gateway</h1></center>
<hr><center>nginx</center>
</body>
</html>


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


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group