olsen Wrote:
-------------------------------------------------------
> Hi all,
>
> Well, what i had tried to do its to restrict some
> acces to my local wampserver from the WAN without
> denied acces from the LAN.
>
> I try to explain.
>
> LAN Access
> Adress Destination Folder
> Local IP wamp/www
> Localhost wamp/www
>
> WAN access
> Adress
> Destination Folder
> Public IP
> Forbiden
> myrouter.dyndns.org wamp/www/site
> (virtual host)
>
> Thats means, if i type in for example "localhost"
> or a local ip as 192.168.0.* open the wamp
> index.php file, and if i type
> "myrouter.dyndns.org" open wamp/www/mysite, and
> for instance if it is typed wan ip adress as for
> example 84.52.31.9 gets 403 forbiden error or
> redirect to a subfolder.
>
> By now, if i type localhost or lan ip it open
> wamp/www folder and if type router.dyndns.org open
> my site defined on vhost.conf, but if typed in wan
> ip adress open wamp/www. This is the access i want
> to restrict or redirect to another folder. My ISP
> provide me a Dinamyc IP access.
>
> I tried diferent configs under httpd-vhosts.conf
> and http.conf but unfortunatetly not working at
> all
>
> If somebody can help me i will be very
> greatfully.
> Thanks in advance
> olsen
you need to either use an htaccess file for this in my vhost file i did this
# Client1
<VirtualHost *:80>
ServerName client.somesite.dyndns.org
ServerAlias client1.somesite.dyndns.org client1
DocumentRoot "E:/wamp/www/client1"
ErrorLog "E:/wamp/www/client1/logs/error.log"
CustomLog "E:/wamp/www/client1/logs/access.log" combined
<Directory "E:/wamp/www/client1">
Options Indexes FollowSymLinks
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
you can also change the allow from all to all from 127.0.0.7 or your lan ip when u do this only you can see site locally but you can have others see site worldwide but hiding your localhost directories..
or you can refer to here [
guides.jlbn.net] they provide excellent guides to get your server setup properly