Welcome to WebmasterWorld Guest from 220.127.116.11
Forum Moderators: phranque
I'm trying to block internet access to certain sites on my home computer. How can I edit the HOSTS file to do this? I have already told the hosts file to redirect to 127.0.0.1, but the catch is that I want the blocked access to deliver a message of my choosing.
Is there a way to direct these blocked sites to a page on my computer or website?
I'm not running Apache.
Let's say I don't want anyone in my house visiting www.yahoo.com. So, I add the appropriate data to the hosts file so that www.yahoo.com gets patched to 127.0.0.1.
Now, let's say someone tried to open Firefox and visit www.yahoo.com. Instead of just giving a server can't be found error, I'd like it to display a webpage I've created.
I assume that I could do this with pretty decent ease in Apache, but I don't need Apache on my home pc...so I'd like to keep it simpler, if possible.
you'll have to remember to set it up so apache starts automatically everytime a user logs-on.
but maybe it would be better to redirect to a different page on localhost instead. because if the browser's homepage is set to localhost, then they'll see the page everytime they start the browser up.
Sorry, maybe I'm hijacking your topic inveniO. But I have similar problem with this. Before that, I'm still running on Virtual machine which is VirtualBox. Lets say I have 3 servers (server A.B and C) and 1 client. Server A is the primary server to run the website (ex. foo.com) and the IP Address is 192.168.0.125. So when the client type server's A IP Address, it will see the site's page. My question is, when the server A down, I want to change to server B which has the same name like server A. So it means the connection to server A has been blocked and change it to server B or C. How to do that? I'm running LAMP on Ubuntu host and guest.
Thanks in advanced.
re3bo0t: you'll need some sort of load-balancing technique: either an appliance (look for BigIP, Barracuda Load Balancer etc), or you can play with Apache's mod_proxy & mod_status.