NiftyHost Forums (Archive)
Simple HTTP Server on Linux - Printable Version

+- NiftyHost Forums (Archive) (https://niftyhost.chary.us/support)
+-- Forum: Technology (https://niftyhost.chary.us/support/forum-7.html)
+--- Forum: Tutorials (https://niftyhost.chary.us/support/forum-10.html)
+--- Thread: Simple HTTP Server on Linux (/thread-1182.html)

Pages: 1 2


RE: Simple HTTP Server on Linux - Serial Thrilla - 03-27-2012

Good choice.

I have a 1080P screen so I recorded it and zoomed in with Camtasia Studio 6 and the quality was still fine :P.


RE: Simple HTTP Server on Linux - MyDigitalpoint - 07-24-2012

Wish I could run a home-based http server on linux, but the real think is that I have never be able to run any Linux software on my computer, but from a USB memory stick.

Who knows if a server could be run that way, but I doubt it because the data transfer is slow than the rate in hard drives.


RE: Simple HTTP Server on Linux - RichardGv - 07-24-2012

(07-24-2012, 09:22 PM)MyDigitalpoint Wrote: Wish I could run a home-based http server on linux, but the real think is that I have never be able to run any Linux software on my computer, but from a USB memory stick.

Who knows if a server could be run that way, but I doubt it because the data transfer is slow than the rate in hard drives.

A web server runs fine on a USB stick, if you can tolerate some speed penalty, and you are not using a USB 1.1 flash drive. I have a whole Arch Linux system on USB stick with a Lighttpd+PHP+MySQL web server. It freezes sometimes when doing heavy I/O operations (like when using Firefox), but it's acceptably fast overall. If you have a USB 3.0 flash drive, then the speed probably utterly wouldn't be a problem.

If you are on Windows, there are numerous HTTP server software out there. Also, Python does have a Windows version, so you could run a Python simple server, too.
http://www.rejetto.com/hfs/
http://downstairs.dnsalias.net/homewebserver.html
http://www.server2go-web.de/download/download.html
http://www.apachefriends.org/en/xampp.html


RE: Simple HTTP Server on Linux - MyDigitalpoint - 07-25-2012

Cool Richard!

Yes, I have an 8GB USB 3.0 flash drive that might serve for the purpose of testing a home-based Linux server and, yes, being over Windows, your information comes handy because I have been struggling with Python, trying to figure out how to run it not just from my computer but also from my hosting space, but I guess is because I'm making a mistake that I would probably could debug having Python installed onto my computer.

Thanks for the links! :)


RE: Simple HTTP Server on Linux - RichardGv - 07-25-2012

(07-25-2012, 07:21 AM)MyDigitalpoint Wrote: Yes, I have an 8GB USB 3.0 flash drive that might serve for the purpose of testing a home-based Linux server and, yes, being over Windows, your information comes handy because I have been struggling with Python, trying to figure out how to run it not just from my computer but also from my hosting space, but I guess is because I'm making a mistake that I would probably could debug having Python installed onto my computer.

If you have any serious needs, lighttpd, nginx, Apache, IIS or even HFS may actually be better choices than this simple Python HTTP server. (It's called "SimpleHTTPServer" for a reason...) It's not particularly worthwhile to set up a Python environment just for a simple HTTP server. It neither uses less resources nor has more features. It simply supports less customizations, is slower, and has no support for dynamically generating content unless you write some Python code. If you have a special favor over Python you may look into its documentation for a more sophisticated server setup -- at the cost of some code to write.

If you have a VPS then you might be able to set up Python on it yourself, and it could slightly (very slightly...) easier than setting up a productive web server. If it's a shared hosting... Well, then why would you need a Python HTTP server when you already have one?


RE: Simple HTTP Server on Linux - MyDigitalpoint - 07-27-2012

No, I have not any Python HTTP server yet, and this is the reason why I have been unable to test those chunks of Python code that I have.

My interest in Python is basically test how good (or bad) is this programming language compared to PHP, but this is not a real need nor intended to use on a server production environment.

However, your input is much appreciated and is helping me to better understanding more what the potential of using Python could be.


RE: Simple HTTP Server on Linux - RichardGv - 07-27-2012

(07-27-2012, 09:33 AM)MyDigitalpoint Wrote: No, I have not any Python HTTP server yet, and this is the reason why I have been unable to test those chunks of Python code that I have.

My interest in Python is basically test how good (or bad) is this programming language compared to PHP, but this is not a real need nor intended to use on a server production environment.

However, your input is much appreciated and is helping me to better understanding more what the potential of using Python could be.

If you wish to learn more about how to install Python 3 and its syntax and libraries, I would recommend the official tutorial: http://docs.python.org/py3k/tutorial/index.html

Python is more of a generic scripting language that is not specifically designed for web server or web development -- yet you could create full-fledged websites with Python. (There are not many premade website scripts usable out of box in the Python world, I suppose. You would need to write some code.) Django, for instance, is a famed web design framework in Python, which you could try: https://www.djangoproject.com/
A list of other Python website frameworks: http://wiki.python.org/moin/WebFrameworks/

Python does not integrate to the web server as closely as PHP does. Python's HTTP server module may not be able to reach the performance of a web server written in C/C++, well, or even Java, since Python is an interpreted language. (It could be much more flexible, though.) I heard websites made with Python (and Django?) are usually operating in CGI mode together with a real web server (Apache, IIS, lighttpd, nginx, etc.). Also, Python websites may not work on many shared hosting services. If you have a VPS then it's not a big deal.

As for the syntax and libraries... Well, I like the syntax and libraries of Python (Python 3!) better personally, but you could have different feelings.

(By the way, I don't recommend you to try Python 2. Various weaknesses that could be very annoying at a particular moment.)