I am trying to limit access to a website to a small set of IP addresses. I am a regular user on the Mac OSX web server. My first attempt at limited access was to create an
order deny,allow deny from all allow from 192.168.0.1
where 192.168.0.1 is the IP address of the machine I want to allow in the sub directory of the website that I want to limit access to. As far as I can tell, the
.htaccess file does nothing since I can access files in the sub-directory from both 192.168.0.1 and 192.168.0.2. Presumably the administrators of the web server have not enabled .htaccess override.
In the top level directory of the website is a file called
I cannot find any information about this file. Copying the file to the sub-directory and adding the
.htaccess stuff to give a
Options +Includes order deny,allow deny from all allow from 192.168.0.1
sort of works. I can access the files in the sub-directory from 192.168.0.1 and cannot access them from 192.168.0.2, but when I try and access from 192.168.0.2 I get a "500 internal server error" and I was expecting a "403 access forbidden". Adding an error document redirect to
Options +Includes ErrorDocument 500 http://www.google.com order deny,allow deny from all allow from 192.168.0.1
has no effect.
Given I have no idea what
.www_access is doing, I am not sure I should be going down this route. Is it possible to limit access to a website to a small set of IP addresses if the web server does not support
The web server has PHP installed, but doesn't see to allow web pages to use it. If I create a php test file
#! /usr/bin/php <?php phpinfo(); ?>
and then ssh into the web server I can run it from the command line and get lots of information. If I then try and accesses it from a browser, I just get the code back. I think there are other scripting languages installed on the webserver, but as far as I can tell none are accessible from the web.