LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 11-09-2009, 04:40 PM   #1
SuperDude123
Member
 
Registered: Nov 2008
Posts: 158

Rep: Reputation: 30
Can I do a HTTP server in 10 min (Debian) ??


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?
 
Old 11-09-2009, 07:08 PM   #2
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fc-15/ fc-20-live-usb/ aix
Posts: 5,053

Rep: Reputation: 852Reputation: 852Reputation: 852Reputation: 852Reputation: 852Reputation: 852Reputation: 852
you can run apache like so
Code:
sudo httpd
 
Old 11-10-2009, 08:19 PM   #3
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 7,531

Rep: Reputation: 2394Reputation: 2394Reputation: 2394Reputation: 2394Reputation: 2394Reputation: 2394Reputation: 2394Reputation: 2394Reputation: 2394Reputation: 2394Reputation: 2394
Ummm... yes, you can.

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.
 
Old 11-11-2009, 12:09 AM   #4
SuperDude123
Member
 
Registered: Nov 2008
Posts: 158

Original Poster
Rep: Reputation: 30
Where's the index.html in that simple server?
 
Old 11-11-2009, 12:23 AM   #5
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
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.

Evo2.
 
Old 11-11-2009, 12:30 AM   #6
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
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>
 
Old 11-12-2009, 01:14 AM   #7
SuperDude123
Member
 
Registered: Nov 2008
Posts: 158

Original Poster
Rep: Reputation: 30
what if I want to move the default /var/www to /home/me/mywebfolder , what do I need to change?
 
Old 11-12-2009, 01:25 AM   #8
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
Quote:
Originally Posted by SuperDude123 View Post
what if I want to move the default /var/www to /home/me/mywebfolder , what do I need to change?
Depends on what web server you are using. Should we assume apache2?

Evo2.
 
Old 11-12-2009, 01:29 AM   #9
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
You can change the folder in the web server configuration file.
 
Old 11-12-2009, 08:49 AM   #10
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fc-15/ fc-20-live-usb/ aix
Posts: 5,053

Rep: Reputation: 852Reputation: 852Reputation: 852Reputation: 852Reputation: 852Reputation: 852Reputation: 852
would symbolic links work ?
 
Old 11-13-2009, 12:24 AM   #11
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
Yeah sym links should most probably work though I will to give it a try.
 
Old 11-13-2009, 02:05 AM   #12
timluo
LQ Newbie
 
Registered: Nov 2009
Distribution: Debian GNU/Linux
Posts: 6

Rep: Reputation: 1
Quote:
Originally Posted by SuperDude123 View Post
what if I want to move the default /var/www to /home/me/mywebfolder , what do I need to change?
You may try Alias directive configured from httpd.conf
here is more information
http://httpd.apache.org/docs/1.3/mod/mod_alias.html

i'm setting up ViewVC for my Subversion server.
Here is my example.(works for me) I'm using the ScriptAlias, though. but pretty much similar i guess
Code:
ScriptAlias /viewvc /usr/local/bin/cgi/viewvc.cgi
ScriptAlias /viewvc /usr/local/bin/cgi/viewvc.cgi
tim
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Slave DNS server zone trasnsfering after 30 min rameshk_tvm Linux - Networking 4 11-06-2009 12:44 PM
monodoc-http gives a http 500 internal server error ernesto_cgf Linux - Software 0 05-10-2007 04:48 PM
Debian Ftp Server, Need set up in 30 Min. seashell11 Linux - Networking 6 08-25-2006 02:28 PM
3.8 Gb Suse 10.1 slow install in 1h30 min. Mandriva 2006 was less than 40 min Emmanuel_uk Linux - Distributions 2 06-15-2006 10:27 AM
Web min http://delilah:10000/ emailssent Linux - Networking 3 09-13-2004 10:35 AM


All times are GMT -5. The time now is 01:35 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration