Thursday, August 5, 2010

is( PYTHON installed ){ Yes: you have a simple HTTP server }

is Python installed, you already have Simple HTTP Server

if you need any simple plain web-server on your machine to server files (html or else)
and
if you have PYTHON installed over your machine
then
you don't need anything else
because
you can run PYTHON itself in Simple HTTP Server mode to serve files from any directory you need
by
following below steps
Step#1.
[ opening shell/command-prompt ]
Step#2.
[ $>cd (change dir) to directory you want to be root of your server ]
Step#3.
[ run this command without quotes "python -m SimpleHTTPServer" ]
Finally, [ Say abra-ca-dabra... ] Thanks...
now
you have a Simple HTTP Server running, that can be accessed at Port 8000 of your Server's IP/Name
so
you can test it by browsing in any web browser at http://YOUR_SERVER_IP:8000/

No comments:

Post a Comment