Restricting access to Wampserver for LAN users
Posted by: nukerster (---)
Date: April 06, 2012 10:50AM

Hello,

I have a question. I'm not sure if similar topics have been discussed here before, but I couldn't find it.
I made a little project and placed in on Wampsrver which is installed on my Local machine. I added

<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Allow from 192.168.0.* (is this string is correct???)
Deny from all
</Directory>

to the httpd.conf file of the Apache. So now all users from LAN supposed to have an access to my project. An access to phpmyadmin is still restricted and this is what I wanted it to be. But what I do want now is to restrict access to all other projects, which are located on this Wampserver. For example I have:
[localhost] and [localhost]
I want myopenproject to be open for everybody and I want myprivateproject to be closed for everyone except me. How could I do this? Please help me if you know how to perform such a restriction. Thank you in advance!



Edited 1 time(s). Last edit at 04/06/2012 10:51AM by nukerster.

Options: ReplyQuote
Re: Restricting access to Wampserver for LAN users
Posted by: RiggsFolly (---.as13285.net)
Date: April 06, 2012 12:17PM

Swpa the deny and allow instructions and see the IP address format

<Directory />
Options FollowSymLinks
AllowOverride None
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
Allow from 192.168.0
</Directory>

Options: ReplyQuote
Re: Restricting access to Wampserver for LAN users
Posted by: nukerster (---)
Date: April 06, 2012 12:32PM

Thank you very much for this correction! But what about restricting access to specific forlders?
What if I want to grant access to one folder and restrict the access to others.
I tried:

<Directory specific_folder/>
Options FollowSymLinks
AllowOverride None
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
Allow from 192.168.0
</Directory>

but it didn't work. It restricts access to the whole Wampserver. I don't understand why this happening.

Options: ReplyQuote
Re: Restricting access to Wampserver for LAN users
Posted by: toivo (---.belrs5.nsw.optusnet.com.au)
Date: April 07, 2012 06:52AM

You can add similar restrictions into a .htaccess file in the specific folder. You need to allow those particular directives in the AllowOverride statement for that directory: [httpd.apache.org]

Options: ReplyQuote
Re: Restricting access to Wampserver for LAN users
Posted by: nukerster (---)
Date: April 10, 2012 05:51AM

Thanks! I don't know why I forgot about .htaccess.

Options: ReplyQuote


Sorry, only registered users may post in this forum.