#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2011
    Posts
    23
    Rep Power
    0

    Question Mod_status and ip resolution


    I'm teaching myself Apache and I came across the server status module (mod_status) as a quick and dirty way to monitor the status of the server. I have it set up according to the directions on the Apache web site but I get 403 Forbidden when I have the following enabled:

    Deny from all
    Allow from localhost

    and I access the server with:

    http://localhost/server-status

    The error log shows:

    [Thu Jul 12 16:15:19 2012] [error] [client 127.0.0.1] client denied by server configuration: /var/www/html/server-status

    Why is it not getting the host name (localhost) and only using the IP address? I tried enabling HostnameLookups (set it to On) and restarted the server but it still doesn't work. Is there something else I'm missing?
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Oct 2009
    Location
    Nebraska, USA
    Posts
    829
    Rep Power
    275
    Im thinking that you have to use IP address when defining the "Allow from" statement..not domain name.

    so, try "Allow from 127.0.0.1" instead of localhost and see if that works.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2011
    Posts
    23
    Rep Power
    0
    Originally Posted by DonR
    Im thinking that you have to use IP address when defining the "Allow from" statement..not domain name.

    so, try "Allow from 127.0.0.1" instead of localhost and see if that works.
    The example in httpd.conf has a domain name with a leading . in the form of .example.com. I'm sure if they did this they mean to use names and not numbers.
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Oct 2009
    Location
    Nebraska, USA
    Posts
    829
    Rep Power
    275
    try adding the Allow from 127.0.0.1 to your list of "allows" and see if it works. make sure to restart apache after altering the config.
  8. #5
  9. No Profile Picture
    Stumpier old Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2003
    Posts
    14,409
    Rep Power
    4538
    Check your error logs, maybe something like open_basedir restriction is really generating the error message. It seems to me the wording of the error is the same.

    Just guessing
    ======
    Doug G
    ======
    It is a truism of American politics that no man who can win an election deserves to. --Trevanian, from the novel Shibumi

IMN logo majestic logo threadwatch logo seochat tools logo