views:

173

answers:

5

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.

A: 

xampp? http://www.apachefriends.org/en/xampp.html

robertbasic
This is an UBUNTU system, XAMPP is difficult to install and update compared to apt.
Rook
I don't agree: you just need to unpack xampp in /op directory and starts it with sudo command. As it is isolated from the ubuntu filesystem, it doesn't clash with it.
Kartoch
well, then:`sudo apt-get install apache2 php5 libapache2-mod-php mysql-server libapache2-mod-auth-mysql php5-mysql phpmyadmin` and you're good to go =) I never used xampp before, tho...
robertbasic
Personnaly, i don't like to have the webserver and all its friend (mysql, etc...) started every time I boot my ubuntu. Well, it's just a matter of opinion...
Kartoch
I am always hacking away on some code, so I always want 'em up :)
robertbasic
xampp is horrible, i would never use it. It can't be updated and has a terrible security record.
Rook
+1  A: 

Xampp is one of the several LAMP available on Linux, and it is a good one.

Installation is easy (documentation is here): load the archive and then:

sudo tar xvfz xampp-linux-1.7.3a.tar.gz -C /opt

cd /opt/lampp/

sudo ./lampp start

Furthemore it does not clash with the filesystem (the full archive is dezipped in /opt directory).

Please look at the full list of X-AMP distributions in wikipedia.

Kartoch
Xampp is HORRILBE and takes 2 more commands than tasksel to install, and cannot be updated easily.
Rook
Yes it takes 2 more commands than tasksel but you can write a script. Furthermore it can be updated very easily (remove, download, unzip, restart) and I don't understand why you want to "up-to-date" with a LAMP distribution for development.
Kartoch
A: 

Ubuntu is awesome, it has a much easier AMP install than Windows(using xampp). Just run this:

sudo tasksel

Check "LAMP" and it will install the entire stack for you. I also recommend doing a :

sudo apt-get install phpmyadmin

Just go to http://127.0.0.1/phpmyadmin to setup new databases.

Rook
LAMP is great but did you read what the OP wrote: a *lightweight Web server* similar to Web Savant.
jspcal
Apache is extremely light weight compared to IIS. Its all relative, Apache will fill his needs.
Rook
he didn't say IIS, he said Web Savant. they are *not* the same thing.
jspcal
thttpd is too way heavy, use netcat.
Rook
which doesn't support cgi. the op said *easy to use* not "well nigh impossible"
jspcal
+4  A: 

If you use CGI or plain HTML pages only, the simplest would be thttpd just:

thttpd -D -C '*.cgi' -p 8080 

And go!

Lighttpd is very simple to configure as well, but requires writing a little configuration file.

Artyom
+1 for the lighthttpd recommendation, this seems appropriate for this context
ChristopheD
Thank you for being the only person answering who actually paid attention to what I asked.Unfortunately Linux is starting to suffer from Weinberg's "White Bread Recipe Warning" and attracting the Windows "use Excel and Access for everything" crowd.
HandyGandy
A: 

I used Mongoose (SHTTPD) for some quick testing. I needed to test HTTP/S + CGI on the fly and found it rather easy to use. I did come across one problem. Whenever I pushed the process into the background the CGI pages would stop working. This was fixed by issuing:

nohup <command> &

Anyways, the link for Mongoose is http://code.google.com/p/mongoose/ if you're interested. For such a tiny web server the features are pretty good.

  • Crossplatform - works on Windows, MacOS and most flavors of UNIX
    • CGI, SSL, SSI, Digest (MD5) authorization, resumed download, aliases
    • IP-based ACL, Windows service, GET, POST, HEAD, PUT, DELETE methods
    • Small footprint: 40 Kb executable on Linux 2.6 i386 system
    • Embeddable with simple and clean API. Source is in single .c file to make things easy
    • Language suport for: o C/C++ (native) o Python - since version 2.6 (done) o C# - since version 2.7 (done) o Ruby - since version 2.9 (todo) o Lua - since version 2.9 (todo)

Cheers