Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to serve a website over a wifi without internet?

I want to serve a website over an open wifi connection but I do not want this wifi connection to have access to the internet. Is this possible and how would I go about doing it.

I have setup websites locally and have gotten access in the browser through localhost or the IP address but I am not sure how I would go about setting up a webserver and serving the website via wifi.

Any insight on this?

like image 652
mmundiff Avatar asked Sep 09 '10 15:09

mmundiff


People also ask

Can Web server function without internet?

Yes, you can connect to a Server without Internet. However, the consequences may be different than normal. For example, let's suppose how can you connect to a Server without an Internet connection. You would most likely to manage a Server offline or within a LAN if you want to connect to a Server without any Internet.

How do I host a website on my router?

You can do this using any computer that is connected to your home network. To access your router settings, you need default gateway IP address. To get it use Command Prompt/Terminal and enter one of three commands, depending on which OS you are currently using. Default gateway IP address is usually 192.168.


2 Answers

you can access your machine's localhost via any computer easily, as long as that computer is connected to the said wifi.

get your computer name, and access it from other machine like this:

http://<your_computer_name_here:port_if_applicable>/website_folder_name

I do this to test my websites on mac and windows at home. My windows machine is called "The-Genius" and I access it via my mac like this:

http://The-Genius/Test/

which leads to the IIS.. if I want to access Apache, which is on port 78, I do this:

http://The-Genius:78/Test/

Hope it helps..

like image 141
LocustHorde Avatar answered Oct 13 '22 09:10

LocustHorde


If you are using a wifi router, you don't have to do anything to get this to work. Whenever a client connects over wifi, they will be able to type in your webserver's IP address to see the website. If you want to use a DNS name then you might be able to set up the DNS names on the router itself.

like image 32
David Avatar answered Oct 13 '22 09:10

David