How to run a simple HTTP server?

Introduction

HTTP server is often required when you want to serve some files to remote hosts, or update firmware of some device. This post shows how to run a simple HTTP server on any machine (Windows or Linux) which has Chrome Web Browser installed.

Before we start

This extension is not a replacement for a full scale production Web Servers. Encryption is not supported either.

Step 1. Download the “Web Server for Chrome” extension

Search for Web Server for Chrome and you will easily find this extension on Chrome Web Store. The application page look like this:

Click Add to Chrome and the extension will be installed. Now, if you go to chrome://apps/ in your Chrome browser you will see the Web Server among the installed apps:

Step 2. Launch Web Server app

Click on Web Server application icon in chrome://apps and you will see the following window:

Click on Choose Folder to select which folder the server should serve files from. As soon as you select the folder, you can navigate to http://127.0.0.1:8887 and you will see the content of the selected folder:

By default the server uses port 8887 and responds to HTTP requests only from the localhost.

Step 3. Enable on all interfaces and/or change port

Most probably you will want to listen for HTTP requests from other hosts.

You can enable the HTTP server for all interfaces (requires restart) if you select Accessible on Local Network:

Restart the server for the changes to take effect:

You can also change the port from 8887 to any other available port.

Step 4. Don’t forget to check your Windows Firewall

If it does not work make sure your Windows Firewall is not blocking the incoming HTTP traffic.

Conclusion.

Now if you you are ever required to serve some files via HTTP you don’t have to install any piece of software if you already a Chrome browser.

Thank you for reading 🙂

One Comment