logo
Apache Lounge
Webmasters

 


About

Forum Index Downloads Search Register Log in  RSS Apache Lounge
 



Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Apache Lounge is not sponsored.

Your donations will help to keep this site alive and well, and continuing building binaries.



denial of access to server?

 
Post new topic   Reply to topic    Apache Forum Index -> Apache



View previous topic :: View next topic  
Author Message
Doug22



Joined: 02 Jun 2013
Posts: 44
Location: Houston TX

PostPosted: Tue 04 Nov '14 2:28    Post subject: denial of access to server? Reply with quote

I'm looking for how to deny an IP access to my server. Not just a particular site. I have several sites on my server. Do I need to put that denial in each and every .htaccess file? Is there some way I can specify an IP denial to everything anywhere on my server?
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 6255
Location: Germany, Next to Hamburg

PostPosted: Wed 05 Nov '14 10:51    Post subject: Reply with quote

In apache 2.4 the require can be set in a directory or a .htaccess file.

I recommend to put it in the directory in each vhost config.

BUT you can use Define

Code:

#global
Define BADIPS "188.40 46.4 176.9 46.166 46.21 78.46 91.207.7.21"

#vhost
    <RequireAll>
    Require all granted
    Require not ip ${BADIPS}
    </RequireAll>
Back to top


Post new topic   Reply to topic    Apache Forum Index -> Apache
Page 1 of 1