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
05-30-2011, 06:55 PM,
#2
RE: Simple HTTP Server on Linux
Cool tip :)
Here's a small tutorial with a example script for extra security.
Be sure to check the folder you're sharing is the right folder, because the entire world can see it! (Unless you use that example script, then only people on 127.0.0.1 can see it.)
With love,
HiddenKnowledge
A.k.a. Yoruichi Shihouin

If you have any questions, feel free to contact me trough email or pm. :)
Reply
05-31-2011, 02:55 AM,
#3
RE: Simple HTTP Server on Linux
Neat. I would do this but stupid satellite Internet only allows 300mb of bandwidth a day.
Reply
05-31-2011, 03:05 AM,
#4
RE: Simple HTTP Server on Linux
I have to say it sucks. Only 300 Megabyte Bandwith a day :(.

Update:

The demo is down. I'm installing CentOS 5.6 x86_64 to my machine since Debian is using old packages and is kinda slow.
Reply
06-11-2011, 04:30 AM,
#5
RE: Simple HTTP Server on Linux
great stuff thanks
Reply
01-30-2012, 12:14 PM,
#6
RE: Simple HTTP Server on Linux
Nice. I didn't know about this at all. I thought I knew a lot of Linux and servers, but never knew this before!

Thanks for the tip! It's great for when you don't feel like installing Apache.
Reply
03-11-2012, 08:53 PM,
#7
RE: Simple HTTP Server on Linux
I finally made a video of this:

Reply
03-27-2012, 12:22 AM,
#8
RE: Simple HTTP Server on Linux
(03-11-2012, 08:53 PM)Serial Thrilla Wrote: I finally made a video of this:

*snip*

Lol, funny how you got a 1020p (HD) version. xD
With love,
HiddenKnowledge
A.k.a. Yoruichi Shihouin

If you have any questions, feel free to contact me trough email or pm. :)
Reply
03-27-2012, 02:46 AM,
#9
RE: Simple HTTP Server on Linux
It's 1080P :) .

Never saw a 1020P video, you probably read it wrong.
Reply
03-27-2012, 02:48 AM,
#10
RE: Simple HTTP Server on Linux
(03-27-2012, 02:46 AM)Serial Thrilla Wrote: It's 1080P :) .

Never saw a 1020P video, you probably read it wrong.

Haha, no, I just typed it wrong in the post :P
I have been making a lot of typo's lately.. I'm going to re-re-read all my posts from now on :)
With love,
HiddenKnowledge
A.k.a. Yoruichi Shihouin

If you have any questions, feel free to contact me trough email or pm. :)
Reply


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: