Contents
just use simple nc netcat command to start a quick webserver on a port and serve the content of a file including the server response headers. (Assuming you have node and npm already installed.) This creates a server on . Try using SimpleHTTPServer in Python.
How do I create an HTTP server in Linux?
To set up an HTTP server:
- Install the Apache HTTP server package. …
- Create the directory where you will copy the full Oracle Linux Release 6 Media Pack DVD image, for example /var/www/html/OSimage/OL6.6 : # mkdir -p /var/www/html/OSimage/OL6.6. …
- Edit the HTTP server configuration file, /etc/httpd/conf/httpd.
How do I start an HTTP server?
Create a HTTP server with one command thanks to Python
- Open a terminal window.
- Navigate to the directory you want to have the root directory.
- Execute the command to start the server.
- Python 2 — python -m SimpleHTTPServer 8000.
- Python 3 — python -m http. server 8000.