LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux > Linux - Newbie
User Name
Password
Linux - Newbie This 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
 
Thread Tools
Old 11-09-2009, 04:40 PM   #1
SuperDude123
Member
 
Registered: Nov 2008
Posts: 141
Thanked: 0
Can I do a HTTP server in 10 min (Debian) ??


[Log in to get rid of this advertisement]
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?
macos SuperDude123 is offline     Reply With Quote
Old 11-09-2009, 07:08 PM   #2
schneidz
Senior Member
 
Registered: May 2005
Location: pa, usa
Distribution: redhat-9/ fc-9-live-usb/ aix
Posts: 1,127
Thanked: 35
you can run apache like so
Code:
sudo httpd
windows_xp_2003 schneidz is offline     Reply With Quote
Old 11-10-2009, 08:19 PM   #3
sundialsvcs
Senior Member
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 2,710
Thanked: 43
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..
unknown sundialsvcs is offline     Reply With Quote
Old 11-11-2009, 12:09 AM   #4
SuperDude123
Member
 
Registered: Nov 2008
Posts: 141
Thanked: 0

Original Poster
Where's the index.html in that simple server?
macos SuperDude123 is offline     Reply With Quote
Old 11-11-2009, 12:23 AM   #5
evo2
Member
 
Registered: Jan 2009
Location: Japan
Distribution: Debian
Posts: 216
Thanked: 27
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.
linuxdebian evo2 is offline     Reply With Quote
Old 11-11-2009, 12:30 AM   #6
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Ubuntu Karmic, CentOS 5.4
Posts: 2,487
Thanked: 158
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>
linuxubuntu linuxlover.chaitanya is offline     Reply With Quote
Old 11-12-2009, 01:14 AM   #7
SuperDude123
Member
 
Registered: Nov 2008
Posts: 141
Thanked: 0

Original Poster
what if I want to move the default /var/www to /home/me/mywebfolder , what do I need to change?
macos SuperDude123 is offline     Reply With Quote
Old 11-12-2009, 01:25 AM   #8
evo2
Member
 
Registered: Jan 2009
Location: Japan
Distribution: Debian
Posts: 216
Thanked: 27
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.
linuxdebian evo2 is offline     Reply With Quote
Old 11-12-2009, 01:29 AM   #9
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Ubuntu Karmic, CentOS 5.4
Posts: 2,487
Thanked: 158
You can change the folder in the web server configuration file.
linuxubuntu linuxlover.chaitanya is offline     Reply With Quote
Old 11-12-2009, 08:49 AM   #10
schneidz
Senior Member
 
Registered: May 2005
Location: pa, usa
Distribution: redhat-9/ fc-9-live-usb/ aix
Posts: 1,127
Thanked: 35
would symbolic links work ?
linux schneidz is offline     Reply With Quote
Old 11-13-2009, 12:24 AM   #11
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Ubuntu Karmic, CentOS 5.4
Posts: 2,487
Thanked: 158
Yeah sym links should most probably work though I will to give it a try.
linuxubuntu linuxlover.chaitanya is offline     Reply With Quote
Old 11-13-2009, 02:05 AM   #12
timluo
LQ Newbie
 
Registered: Nov 2009
Distribution: Debian GNU/Linux
Posts: 3
Thanked: 0
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
windows_98_nt_2000 timluo is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

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 07:32 AM.

Main Menu
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
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration