LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-04-2005, 03:22 AM   #1
rincewind
Member
 
Registered: Mar 2004
Posts: 32

Rep: Reputation: 15
Apache directory problems..


Hi,

I got this new gentoo server that I'm configuring..
I've emerged apache and everything works fine exept one thing.

If i browse the site http://192.168.0.8/demo1
i cant get to the the folder /var/www/localhost/demo1/ directory..
Yet if I browse to the site http://192.168.0.8/demo1/
it works nicely..=) The trailing / must be there and I dont whant that=)

Does anyone know how to fix this?

Regardz,
-- Rincewind
 
Old 01-04-2005, 03:57 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Check you httpd.conf to see if you have an entry like:
Quote:
Alias /demo1/ "/var/www/localhost/demo1/"
and remove the trailing slashes.

Cheers
 
Old 01-04-2005, 04:50 AM   #3
rincewind
Member
 
Registered: Mar 2004
Posts: 32

Original Poster
Rep: Reputation: 15
Okay, thanks, but if i whant this to happen in all the directories under my /var/www/localhost/
?
Hot do I do that?...
 
Old 01-04-2005, 05:22 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
If /var/www/localhost is your DocumentRoot then you have to do nothing. This is only for the "Alias" directories which are directories outside the DocumentRoot. If that's the case you can remove and the "Alias /demo ..." line from httpd.conf
 
Old 01-04-2005, 07:33 AM   #5
rincewind
Member
 
Registered: Mar 2004
Posts: 32

Original Poster
Rep: Reputation: 15
Nope...
well... A bit of a typingerror there from my part..
/var/www/localhost/htdocs/ is the DocumentRoot directory.. (i can surf to this directory by http://192.168.0.8/)

And
/var/www/localhost/htdocs/demo1/
is a subdir of that one (obviously)
and I can't surf to that one via
http://192.168.0.8/demo1
but i CAN surf to
http://192.168.0.8/demo1/
(the / in the end makes it possible?!)...

The same goes to all the other directories that lies in /var/www/localhost/htdocs/
and all of the subdirs to all of thoes directories aso..
Cant I make a global change that tells apache to look for a directorie if no file was found or something like that?

Thanks,
-- Rincewind

Last edited by rincewind; 01-04-2005 at 07:35 AM.
 
Old 01-04-2005, 04:32 PM   #6
mancini
LQ Newbie
 
Registered: Sep 2004
Distribution: Slackware
Posts: 16

Rep: Reputation: 0
yes such a option exists and is enabled by default only in apache 2
http://httpd.apache.org/docs-2.0/mod...directoryslash
 
  


Reply



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
Apache Directory Listing Of NFS Mount, cannot view directory list via apache luqmana Linux - Networking 2 12-19-2005 06:03 AM
Apache Directory 2782d4 Linux - Software 3 10-12-2005 03:33 PM
directory content on apache spank Linux - Newbie 1 09-23-2005 02:40 PM
apache directory Longinus Linux - Software 2 04-05-2004 05:37 AM
Apache directory... Z28kid Linux - Newbie 9 02-17-2003 05:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:26 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
Open Source Consulting | Domain Registration