Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Web Server for testing on Linux

Tags:

linux

testing

I am looking for a simple easy to use lightweight Web server ( linux/Ubuntu Koala ) for testing some web apps.

On Windows I used Web Savant ( which was rather easy, just enter the html directory and the bin directory and press start ) to give some people an idea of what I'm looking for.

Update: My apologies. I didn't realise that this was a requirement untill now. Ideally the whole package would be one executable file, however since it is a webserver it would be understandable if there were some infrastructure created so maybe a tarball containing a executable. It would be nice if it started from the commandline and required no administrator privileges to run. Furthermore it should not require any configuration files or log files stored in any areas which are usually administrator access only.

PS This is a question about a tool for testing programs, not a question about system administration. Thus this question is appropriate for stackoverflow not serverfault. If you insist on arguing this, then I suggest you reread the question. Still want to argue? Keep rereading the question untill you understand it, I'll wait. Understand it now? Good now go away.

like image 208
HandyGandy Avatar asked Jan 21 '10 21:01

HandyGandy


People also ask

Which web server is used for Linux?

HTTPD - Apache2 Web Server. Apache is the most commonly used Web server on Linux systems.

Is Linux server a web server?

The most popular operating system to run web servers on is Linux, which most hosting companies do. Many web server programs are available, but Nginx and Apache are undoubtedly the two most used web servers that power the internet today.


1 Answers

This question is currently one of the top google results for "lightweight web server ubuntu", and while I didn't find the current answers all that helpful, I stumbled upon another solution that is installed by default on most every linux system:

python -m SimpleHTTPServer

This will run a webserver in the current directory (html, css, images, documents, etc), serving the files to localhost:8000, and shouldn't require any additional software installation. Python documentation for this module has more information on parameters, etc.

For someone looking to quickly test a website, this is an ideal solution.

like image 87
sAlexander Avatar answered Oct 02 '22 12:10

sAlexander