Forum Moderators: open

Message Too Old, No Replies

limit access to localhost

I want specified files to not be accessible from outside.

         

mameha1977

1:37 am on Jun 10, 2008 (gmt 0)

10+ Year Member



I have a win2003 server running some apps in the 'default web site'

I have just installed PHP on the 'default web site' and I want to use it to run some admin jobs. BUT I do not want the PHP scripts to be accessible over the internet, they should only run from local machine.

Is it possible to set it up so that the files can be executed only by localhost?

WesleyC

4:24 pm on Jun 11, 2008 (gmt 0)

10+ Year Member



Set them up in a virtual directory. In the root site, disable PHP, then enable it only for the virtual directory. Next, enable windows authentication for the virtual directory.

Now, they should be accessible for you and for anyone that can log into your computer directly, but no one else.

A side benefit is that you can log into the site from anywhere using your windows credentials (though only credentials that have login permission on your machine will work) and run the PHP scripts.

[edited by: WesleyC at 4:24 pm (utc) on June 11, 2008]