Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to Restrict URL

Status
Not open for further replies.
Just to elaborate on fehrke's accurate information :)

In your case Deny is applied first, allow second (Deny, Allow)

In this order Deny All is what it says on the tin all will be blocked. Unless seperate Allow rules are defined.

Aswell as localhost, you can use the following.

A (partial) domain-name
Example: Allow from apache.org

A full IP address
Example: Allow from 10.1.2.3

A partial IP address
Example: Allow from 10.1

A network/netmask pair
Example: Allow from 10.1.0.0/255.255.0.0

A network/nnn CIDR specification
Example: Allow from 10.1.0.0/16

E.g.

<Directory /portal/console>
Order Deny,Allow
Deny from all
Allow from 10.1.0.0/16
</Directory>

In other cases
You can reverse this idea to block select individuals (known trouble makers, departments, etc. Using:

<Directory /your/site>
Order Allow,Deny
Allow from all
Deny from some.abusive.host
</Directory>

Hope this helps to understand this particular area of apache httpd :)

Rob
Grumpy by name, helpful by nature
 
2 questions.
How do I set up an intranet using Apache2Triad?.
how do i set up an Apache based intranet?

I only know about intranets in theory.
 
In Apache, Say your intranet is in a folder '/intranet/site'

You could simply reference that folder by means of...

<Directory /intranet/site>
Order Deny,Allow
Deny from all
Allow from 10.1.0.0/16 # whatever your network ip is
</Directory>

or even easier

<Directory /intranet/site>
Order Deny,Allow
Deny from all
Allow from 10.1 # whatever your network's partial ip is
</Directory>

In this second example any IP between 10.1.1.1 and 10.1.254.254 would be able to connect.

Rob
Grumpy by name, helpful by nature
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top