Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I need a quick and and simple http server for my debian box. All I want it to do it load up one directory and have all html files bellow that. What should I install and what ports do I need to open up?
An HTTP server is an extremely simple program to write ... when someone else has already done the work for you. Note, however, that systems will by-design restrict access to "low-numbered ports" such as the HTTP default port (80). So, if you can stand to include a port-number in your URL [i](e.g. http://localhost:8500/foobar, you're in business ... no special privileges required.
If, on the other hand, you do need to be able to omit the port-number from your URLs, then you'd probably be better-off to go all the way and use Apache.
Last edited by sundialsvcs; 11-10-2009 at 08:23 PM.
I always just use the apache2 (or apache) package. Should take much less than 10 min to install and setup. However there are a number of lighter http servers packaged for Debian. For example
thttpd, fnord, bozohttp etc.
The big plus is that being Debian package most of the configuration is already done for you.
Distribution: Ubuntu Lucid, Ubuntu Server 9.10/10.04, CentOS 5.5 Final
Posts: 4,331
Rep:
You could put the index.html anywhere you want. You just need to tell apache about the Document Root and Directory Index.
Typically web root folder is /var/www. Put your index.html there and start your server.
On web browser browse your server like http://<your server name>
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.