How to Deploy a Web App on a Local Network

Jeet Sharma September 1, 2017 Uncategorized

Generally the web apps are deployed online for all the internet users using web server by opting to any of the web service providers like  GoDaddy, BigRock, Hostgator  etc.

But here in this post we will discuss and setup a web app on a offline web server and make it available on network either using LAN(Local Area Network) or WiFi.

So, Web Server is a computer program or application that accepts all the requests from clients, process them and responds back to them in the form of web pages.

The most popular web server as of now is Apache, an open source product of The Apache Software Foundation followed by IIS, a product of microsoft and Nginx by nginx inc.

Web server stacks are used for offline web production and testing or local hosting. Web server stacks are a combination of softwares or applications in a single package to perform a particular task on web. WAMP, a windows based apache, MySQL and PHP based web server and XAMPP, a cross platform based apache, MariaDB, PHP and Pearl based web server available for Windows, Linux and Mac.

So, how to deploy PHP web apps offline on a network?

when a web server is installed on a computer system, system starts acting like a web server to all the other computers in network with when offline and to all the systems of world when online that is web server not only accepts local network requests, it can respond to the internet requests too.

Suppose there is a network of 4 systems has given configuration.
System-1: IP:192.168.1.10 (Web Server)
System-2: IP:192.168.1.11
System-3: IP:192.168.1.12
System-4: IP:192.168.1.13

How to Deploy Web App on a Offline Local Network - Dots Created

4 System WiFi Network

Here in this configuration System-1 has Web server installed it can be any web server stack application out of available in market and as above mentioned WAMP and XAMPP are most popular ones and System 2 to 4 are in network with it using a WiFi router(or it will work same with LAN too).

Now the other systems connected to the same network are able to access the web root directory of server using web browser, when server is online.

Host the Web App on Local Network

Start the web server on system-1 and the put web app in side the server’s recommended directory(mentioned in the installation posts given above).

now it is accessible around the network using the IP address of the web server.
Go to systems other then web server and inside web browser access the app using web server’s IP as given…

URL: 192.168.1.10/name-of-the-web-app
name-of-the-web-app is the name of the
folder contains index file of web app inside server directory.
example: Web app folder name is: “myApp”
URL: 192.168.1.10/myApp

The data submitted on the web app using forms or other way will be on network and stored on the web server database or file system. It completely depends upon the application script or code irrespective of the systems. so, here data submitted from web app will be stored on System-1(Web Server).

If the web server is connected to internet then the web server can respond to the internet requests as well.

Note: Here WAMP Server can only works with PHP apps and XAMPP Server can only works with PHP and Pearl. For Java based web apps Tomcat will be the server.

To find the IP addresses of the system open the Command prompt or Terminal and run the given command and check for IPv4 address.

Command Prompt command: ipconfig
Mac Terminal command:
For Wireless: ipconfig getifaddr en1
For Ethernet: ipconfig getifaddr en0

Let me know of doubts and feedback in comment section.

Thank You 🙂


Authored By Jeet Sharma
Blogger. Dots creator at DotsCreated. I love to experiment with new technologies and products. 90's Kid. :)

Leave a Comment

Your email address will not be published. Required fields are marked *

*
*