How to configure a local web server

Jugo Mobile
By
Jugo Mobile
Jugo Mobile is a platform dedicated to high-quality content in gaming, sports, and tech. Engage with high-quality content and connect with fellow enthusiasts and experts. Explore...
10 Min Read

The most efficient way to test dynamic content is through a local web server. If you need to know how to set one up, you’re in the right place.

In this article, we will show you how to configure a local web server on various operating systems and how to test a successful installation.

Starting

A local web server is essentially set up by installing software on your computer to give it web server capabilities; It is “local” since you are in charge of managing it. We will show you how to turn your computer into an HTTP server, mainly based on installing the Apache software. But first, here are some prerequisites:

  • A dedicated computer to become your server
  • Running Windows, Linux, or a Mac computer with macOS
  • An Internet connection
  • Dual core 2 GHz or higher
  • 4GB RAM
  • 1 GB of free disk space.

How to set up a local web server on a Windows 10 PC

Windows 10 is not Unix-based, so we will install XAMPP, which is a combination of Apache, MySQL, and PHP. To install XAMPP, do the following:

  1. Navigate to XAMPP and proceed to install the Windows version.
    How to configure a local web server
  2. When prompted, run the installer.
  3. Select “Apache” to install only one web server.
  4. Once the installation is complete, click “Finish” to open the XAMPP control panel.

To confirm successful installation, enter “127.0.0.1” either “localhost” in the address bar of your web browser. The XAMPP configuration page should appear.

How to set up a local web server on a Mac

MacOS has the Apache web server preinstalled; To turn it on, do the following:

  1. Click “Finder.”
    1711159295 773 How to configure a local web server
  2. Click “Applications” > “Utilities”, double-click “Terminal”.
    1711159295 53 How to configure a local web server
  3. Now go in and run this command to turn on Apache:
    sudo apachectl start
    1711159295 96 How to configure a local web server
  4. To confirm that Apache is active, enter “127.0.0.1” either “localhost” in the address bar of your web browser. You should see a “It works!” message.
    1711159295 507 How to configure a local web server

How to configure a local web server in Ubuntu?

To install the Apache web server on Ubuntu Linux 18.04, do the following:

  1. Access a terminal and enter the command:
    sudo apt-get install apache2
  2. Confirm the installation and then sit back while Apache installs.
  3. To confirm that the installation was successful, enter the following in the address bar of a web browser:
    https://local.server.ip
    • In the web browser, you should see the default Apache2 Ubuntu page.

How to configure a local web server on a Linux device

  1. Access a terminal for Debian and Ubuntu/Ubuntu-based distro and enter the command:
    sudo apt install apache2
    • For CentOS and Red Hat, enter the command:
    sudo dnf install httpd
  2. To confirm that the installation was successful enter “localhost” either “127.0.0.1” in your web browser.
    • The default Apache welcome page should display “It works”.

How to configure a LAN web server

Now we will show you how to set up a LAN network through Windows that connects to the Internet. First of all, you will need the following:

  • a computer (server)
  • a network switch
  • Broadband connection
  • a router (with built-in modem)
  • The devices you want to connect to the network.
  • ethernet cables

Connect your first computer:

Connect your router or network switch to the computer using an Ethernet cable, then turn it on. If you are setting up for the first time, the “Set up a network” wizard will do this automatically. If it doesn’t appear, do the following:

  1. Click “Network and Sharing Center” from the “Control Panel” or “Settings.”
    1711159295 428 How to configure a local web server
  2. Select “Set up a new connection or network.”
    1711159295 576 How to configure a local web server
    • Follow the instructions on the screen.

Set up your Wi-Fi:

If you want your devices to be connected to your network wirelessly, you’ll need to set up Wi-Fi; If not, you can use ethernet cables.

Follow the instructions provided in your router/network switch manual to enable Wi-Fi. To make it as safe as possible, do the following:

  • Consider changing the default SSID (network name), Wi-Fi login, and password. This can be done by logging into your router, either through network settings or a web browser on your PC.
  • Be sure to choose the most advanced security protection – currently it is WPA2.
  • Now, for the changes to take effect, restart your PC.

Connect your LAN to the Internet:

For your LAN web access, connect your router and modem to the main telephone line, using the WAN port.

Connect your devices to the LAN:

Whether you connected your devices to the LAN using Wi-Fi or an Ethernet cable, do the following:

  • On your devices, turn on Wi-Fi
    1711159295 913 How to configure a local web server
  • Select your network
    1711159295 951 How to configure a local web server
  • Enter your new password when prompted
    1711159295 464 How to configure a local web server

To connect to your LAN using Ethernet cables:

  • Connect the cable to your network switch/router
  • Connect the other end to your device
  • Do the same with your other device.[s]You can access them from any device on your LAN.

Now start sharing:

To set up a “homegroup” to share resources on your network, do the following:

  1. Navigate to “Control Panel” > “Network and Internet” > “Homegroup”.
  2. Select “Create a homegroup”, it will start the homegroup setup wizard and give you the password needed for the other devices to connect to the LAN.

There are several ways to share and provide access to resources on a LAN, including:

  • Right-clicking on files or folders > “Share with…”
  • Add files to public folders and turn on “Public Folder Sharing” through the Network and Sharing Center.

How to configure a local HTTP server

Now we’ll show you how to set up a local web server for testing. For a Python installation on Windows, do the following:

  1. Navigate to the Python home page python.org.
    1711159296 489 How to configure a local web server
  2. In the “Download” p, select the Python “3.xxx” link.
    1711159296 607 How to configure a local web server
  3. Towards the bottom of the screen, select the “Windows x86” exe file to download.
  4. Run the file when you download it.
  5. From the first page, make sure to select the “Add Python 3.xxx to PATH” checkbox.
  6. Select “Install” and then “Close” when finished.
  7. Go to the command prompt and enter this command to check if the installation was successful:
    1. python -V
    2. # Or you may have command py available,
    3. # in that case attempt py -V

This will show the version. If the number is correct, type the following command “cd”, then in the directory where your example resides:

  1. # add the directory name to enter, e.g.
  2. cd Desktop
  3. # use two dots to go up a directory level if necessary

cd ..

Now to start the server in the directory, enter the following commands:

  1. # If the Python version displayed is more than 3.X
  2. python3 -m http.server
  3. # In windows as an alternative enter “python” to substitute “py -3”, or “python3”
  4. # If Python version 2.X is displayed

python -m SimpleHTTPServer

To view a list of the directory contents, go to the server from your web browser’s address bar, enter “localhost:8000

If port 8000 is already in use, use another port, for example:

  • python3 -m http.server 7800 (Python 3.x) or
  • python -m SimpleHTTPServer 7800 (Python 2.x)

Then enter “localhost:7800” to access the server.

Additional FAQs

What is a LAN?

A LAN (local area network) connects a set of devices in an area, for example in a home, office, or building. The size of a LAN can vary from thousands of users and devices to a single user.

What is a WAN?

A WAN (wide area network) connects telecommunications geographically. It is typically used by government entities, schools, and businesses to transmit data between each other, allowing people to carry out their functions regardless of their physical location.

From a normal computer to a powerful web server

Local web servers are great for hosting websites and storing virtually anything you want to allow others to access. With software packages that magically turn your regular PC or computer into a web server, it’s pretty easy to set one up.

Now that we’ve shown you how to set up your own, were you able to get your web server up and running? What kinds of things do you use your web server for? We’d love to hear from you, leave a comment in the p below.

Share This Article
Follow:
Jugo Mobile is a platform dedicated to high-quality content in gaming, sports, and tech. Engage with high-quality content and connect with fellow enthusiasts and experts. Explore the latest trends and innovations in our vibrant community. Join us and experience the future today!
Leave a Comment
Grow your brand and reach a larger audience. Advertise with us today and get noticed by thousands.
© 2025 Jugo Mobile. All Rights Reserved.