LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   override default homepage with apache (https://www.linuxquestions.org/questions/linux-server-73/override-default-homepage-with-apache-716076/)

mattsoftnet 04-01-2009 10:17 AM

override default homepage with apache
 
when you go to some public wireless access points, when you first open your browser, it overrides the home page or whatever other page is loading and shows you a login screen for the wireless provider. I'd like to figure out how to do something similar, but a little different.

I've had thoughts about starting an open source project for a lan party intranet. I've seen a few around the internet, but I know I can make something much better.

here's the best description of what I want to do. I'm hoping there is a simple way to set this up. when people come to a lan party, they set up their computer on a table. they're provided with power and an eithernet connection to the lan party's network. the computer is assigned an ip, dns, and gateway addresses with a dhcp server. when they open their browser, I want it to automatically bring up the lan party's intranet home page, instead of their custom homepage. how can I do this?

the only way I can think of, is some kind of proxy server. but I don't want to have every guest setting proxy host addresses manually. it has to be automatic. I was thinking, have the server keep a database of the first page that is ever opened from each ip address on the network, and have it assume this url is the guests homepage. whenever this same url is called upon any time in the future, the server would assume the guest is trying to access their homepage, and just redirect them to the intranet. sounds doable, but how do I hook in? I remember some proxy servers in windows having a transparent proxy feature, but I have no clue how to do that on linux. should it be done on the dns side? how could I determine the ip address being requested is for the guests home page and not a messaging service or a game server? does opendns.com maybe offer the kind of service I'm looking for?

paulsm4 04-01-2009 10:36 AM

Hi -

What you're talking about is called a "Captive Portal".

It has nothing to do with Apache per se. It's possible because you control the DHCP lease, you control DNS, and you control the firewall.

Here's a bit more detail:

http://en.wikipedia.org/wiki/Captive_portal

'Hope that helps .. PSM

mattsoftnet 04-03-2009 12:18 PM

thanks. exactly what I was looking for. I didn't know what it was called, so it was tough to find anything on google.


Quote:

Originally Posted by paulsm4 (Post 3495033)
Hi -

What you're talking about is called a "Captive Portal".

It has nothing to do with Apache per se. It's possible because you control the DHCP lease, you control DNS, and you control the firewall.

Here's a bit more detail:

http://en.wikipedia.org/wiki/Captive_portal

'Hope that helps .. PSM


mattsoftnet 04-03-2009 01:38 PM

I think I might need more of a custom solution. I've been doing some reading, but I haven't tested any of the existing programs yet. the difference with my project is that I don't want the page coming up only to authenticate. I want it coming up in place of the guests home page.


All times are GMT -5. The time now is 02:16 PM.