How do I serve only internal intranet requests for a site with Apache?
- by purpletonic
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>