Page 1 of 1

Please help with security of multiple websites.

PostPosted: 21. February 2013 10:32
by aspardeshi
I am using multiple websites in htdocs, I have a local ip range 192.168.1.xx and a single public ip 116.xxx.xxx.xxx. all of my websites are accessible through both the local network and public ip due to proper natting. now my problem is that i want

1. only certain websites to be accessed only from ip range 192.168.1.xx
2. remaining websites accessible from 192.168.1.xx and 116.xxx.xxx.xxx

Please tell me how to do this by taking example of four websites(folders in htdocs)

websitefolder1 accesible from 192.168.1.xx only
websitefolder2 accessible from 192.168.1.xx and 116.xxx.xxx.xxx
websitefolder3 accessible from 192.168.1.xx and 116.xxx.xxx.xxx
websitefolder4 accesible from 192.168.1.xx only
websitefolder5 accesible from 192.168.1.xx only

Can you please help me how to accomplish this.

My system details are as below:-
Xampp version win32 1.7.7 vc 9 on Windows 7

Re: Please help with security of multiple websites.

PostPosted: 21. February 2013 14:25
by Nobbie
Read and follow the documentation about "Allow, Deny, Order":

https://httpd.apache.org/docs/2.0/mod/mod_access.html

P.S.: Or did you ask the wrong question?

Do you mean

websitefolder1 accesible from 192.168.1.xx only

or do you mean instead

websitefolder1 accesible on 192.168.1.xx only


Anyway, Allow and Deny is what you nead, but in different manner depending on your question.