Your Question: How Do I Create an Http Server in Linux?
Contents

How do I start an HTTP server in Linux?

Debian/Ubuntu Linux Specific Commands to Start/Stop/Restart Apache

  1. Restart Apache 2 web server, enter: # /etc/init.d/apache2 restart. $ sudo /etc/init.d/apache2 restart. …
  2. To stop Apache 2 web server, enter: # /etc/init.d/apache2 stop. …
  3. To start Apache 2 web server, enter: # /etc/init.d/apache2 start.

How install simple HTTP server in Linux?

Open up a terminal and type:

  1. $ cd /home/somedir $ python -m SimpleHTTPServer. That’s it! …
  2. Serving HTTP on 0.0. 0.0 port 8000 … …
  3. You can also access it via:
  4. If the directory has a file named index. …
  5. $ python -m SimpleHTTPServer 8080.
Sarah Jenkins

Sarah Jenkins

Senior Technology Editor & AI Specialist

Sarah Jenkins is a veteran tech journalist with over 12 years of experience covering artificial intelligence, mobile innovations, and digital ethics. Her insights have appeared in leading technology publications worldwide.

Share this article
Twitter Facebook Pinterest