Simple HTTP Server on Linux
05-30-2011, 01:01 AM, (This post was last modified: 03-11-2012, 08:54 PM by Serial Thrilla.)
#1
Simple HTTP Server on Linux
In this little text based tutorial I will show you how to start and run a simple http server on Linux. It works with every Linux distribution. In my case I'll use Debian Squeeze like in this tutorial. You might need root access if you want use port 80 otherwise you have to stick with port 8000!

Tutorial:
1. Get python:
Use su if you are not root and enter the password and hit the submit button. Next use "apt-get install python" and hit the submit button. Wait until python is installed.

2. Start the server:
I recommend you to use software like Tmux so the http servers runs when you are not in SSH session or connected to the server.

So to start the server simply use "python -m SimpleHTTPServer 8000". If you use root you can run it on port 80 by using "python -m SimpleHTTPServer 80".

Thats it :) I recommand you to create a user for it so you don't get security issues with root and do not run this script in your home direction, create a folder like www for it..

Demo HTTP Server: http://91.218.37.39:8000 (Down, installing CentOS)
This is my dedicated server in the Ukraine :).

Thanks to RichardGv who gave me the advice with the python module :D.

Reply


Messages In This Thread
Simple HTTP Server on Linux - by Serial Thrilla - 05-30-2011, 01:01 AM
RE: Simple HTTP Server on Linux - by meds - 05-31-2011, 02:55 AM
RE: Simple HTTP Server on Linux - by lxw2005 - 06-11-2011, 04:30 AM
RE: Simple HTTP Server on Linux - by rowebil - 01-30-2012, 12:14 PM
RE: Simple HTTP Server on Linux - by RichardGv - 07-24-2012, 10:03 PM
RE: Simple HTTP Server on Linux - by RichardGv - 07-25-2012, 02:06 PM
RE: Simple HTTP Server on Linux - by RichardGv - 07-27-2012, 11:38 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [MyBB] Simple Group Legend v2 Serial Thrilla 3 3,717 01-21-2012, 02:18 AM
Last Post: Serial Thrilla
  Create a fully working Counter Strike server with HLDS Serial Thrilla 0 1,080 05-30-2011, 01:03 AM
Last Post: Serial Thrilla
  Counter-Strike Dedicated Server on Debian Squeeze Serial Thrilla 0 1,542 05-30-2011, 01:02 AM
Last Post: Serial Thrilla

Forum Jump: