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 |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
11-09-2009, 04:40 PM
|
#1
|
Member
Registered: Nov 2008
Posts: 158
Rep:
|
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?
|
|
|
11-09-2009, 07:08 PM
|
#2
|
LQ Guru
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,326
|
you can run apache like so
|
|
|
11-10-2009, 08:19 PM
|
#3
|
LQ Guru
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,989
|
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.
|
|
|
11-11-2009, 12:09 AM
|
#4
|
Member
Registered: Nov 2008
Posts: 158
Original Poster
Rep:
|
Where's the index.html in that simple server?
|
|
|
11-11-2009, 12:23 AM
|
#5
|
LQ Guru
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,726
|
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.
|
|
|
11-11-2009, 12:30 AM
|
#6
|
Senior Member
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,638
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>
|
|
|
11-12-2009, 01:14 AM
|
#7
|
Member
Registered: Nov 2008
Posts: 158
Original Poster
Rep:
|
what if I want to move the default /var/www to /home/me/mywebfolder , what do I need to change?
|
|
|
11-12-2009, 01:25 AM
|
#8
|
LQ Guru
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,726
|
Quote:
Originally Posted by SuperDude123
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.
|
|
|
11-12-2009, 01:29 AM
|
#9
|
Senior Member
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,638
Rep:
|
You can change the folder in the web server configuration file.
|
|
|
11-12-2009, 08:49 AM
|
#10
|
LQ Guru
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,326
|
would symbolic links work ?
|
|
|
11-13-2009, 12:24 AM
|
#11
|
Senior Member
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,638
Rep:
|
Yeah sym links should most probably work though I will to give it a try.
|
|
|
11-13-2009, 02:05 AM
|
#12
|
LQ Newbie
Registered: Nov 2009
Distribution: Debian GNU/Linux
Posts: 6
Rep:
|
Quote:
Originally Posted by SuperDude123
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
|
|
|
All times are GMT -5. The time now is 03:08 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|