SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    Apr 2008
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Apache "remembers" old configuration directives?

    Hi. I have been experiencing the following Apache behaviour:

    I put a "Deny from" directive for a particular IP into one of the Apache configuration files (e.g. httpd.conf) on my server. Then I want to REVERT the directive, and no longer deny access from that IP. This proves next to impossible.

    I have tried removing the "Deny" or replacing it with an "Allow" - always, of course, restarting Apache after making any change. But Apache seems to remember that this IP has been been denied access, and keeps denying. The only remedy I have found was to put an "Allow" for the same IP into the .htaccess file for the given directory - but the remedy only lasts while the "Allow" is in the .htaccess file. When I take it out, Apache reverts to its remembered "Deny" behaviour.

    To recap:

    - I put a "Deny from <IP>" in the Apache config file. Result: The IP gets denied.
    - I eliminate the "Deny" from the Apache config file. Result: The IP is still denied.
    - I put an explicit "Allow from <IP>" in the .htaccess file. Result: The IP is now allowed.
    - I remove the "Allow" from the .htaccess file. Result: The IP is back to being denied.

    I have not been successful at finding any clue about this behaviour on the Web. Does Apache cache its configuration directives, and add new ones without removing any already "cached" ones? Can anybody please explain the mechanism behind what I am seeing, and advise me what to do to make Apache forget a "Deny"?

    By the way, my server is under Plesk. Does that matter, or is the behaviour I am seeing standard?

    Many thanks in advance.

    Hormuz

  2. #2
    Certified Ethical Hacker silver trophybronze trophy dklynn's Avatar
    Join Date
    Feb 2002
    Location
    Auckland
    Posts
    14,656
    Mentioned
    19 Post(s)
    Tagged
    3 Thread(s)
    Hormuz,

    First, WELCOME to SitePoint and the Apache Forum!

    Second, so long as you have removed the DENY from httpd.conf AND restarted Apache, that directive will be gone. That said, I've experienced some problems with the Apache monitor which requires that I STOP Apache then START Apache to have the updated httpd.conf read.

    Have you checked Plesk to see if that has picked up the change in httpd.conf and recorded it in its own software? Control panels like Plesk do have an IP Deny feature so be sure you check that, too.

    Regards,

    DK
    David K. Lynn - Data Koncepts is a long-time WebHostingBuzz (US/UK)
    Client and (unpaid) WHB Ambassador
    mod_rewrite Tutorial Article (setup, config, test & write
    mod_rewrite regex w/sample code) and Code Generator

  3. #3
    SitePoint Member
    Join Date
    Apr 2008
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Many thanks, DK. Restarting Apache definitely doesn't do it for me. I *have* tried to STOP it, take a breath, and then START it again - but that didn't improve matters either.

    I suspect there's something in the Plesk infrastructure that is causing this - but I have no idea what it might be. It's driving me a bit nuts, I have to say.

    I don't see any interface in the Plesk panel that has anything to do with Apache configuration files.


    Hormuz

  4. #4
    Certified Ethical Hacker silver trophybronze trophy dklynn's Avatar
    Join Date
    Feb 2002
    Location
    Auckland
    Posts
    14,656
    Mentioned
    19 Post(s)
    Tagged
    3 Thread(s)
    Hormuz,

    No, it would be IP Ban or IP Protect. In cPanel, it's "IP Deny Manager." Keep taking a look into every function until you find the IP Address you'd blocked. Something will not look right - if you didn't put it there, remove it.

    Regards,

    DK
    David K. Lynn - Data Koncepts is a long-time WebHostingBuzz (US/UK)
    Client and (unpaid) WHB Ambassador
    mod_rewrite Tutorial Article (setup, config, test & write
    mod_rewrite regex w/sample code) and Code Generator


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •