Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have an externally facing web server on our domain that we use for testing multiple sites. I have a site on this server that I want only people from within our intranet to view. How do I prevent requests originating from outside the intranet from seeing this website?

I tried the following in my apache config file, but I get a 403 error.

<Directory />  
  Options FollowSymLinks  
  Order Deny,Allow
  Allow from domain.com 
  Allow from 10.0.0.0/10.255.255.255
  Deny from All
  AllowOverride None
</Directory>
<Directory /var/www/sitename/public>
  Options Indexes FollowSymLinks MultiViews
  Order Deny,Allow
  Allow from domain.com 
  Allow from 10.0.0.0/10.255.255.255
  Deny from All
  AllowOverride None
</Directory>
share|improve this question

1 Answer 1

up vote 3 down vote accepted

You format is wrong on the Allow from line - you need to specify a valid subnet mask or a CIDR mask - you seem to want he whole 10.0.0.0/8 to be able to access so that would be either

Allow from 10.0.0.0/8 or Allow from 10.0.0.0/255.0.0.0

share|improve this answer
    
Perfect, thank-you. I thought I had something close, just didn't know what wasn't quite right. –  purpletonic May 26 '10 at 11:10

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.