You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Don <dn...@san.rr.com> on 2003/11/17 07:58:33 UTC

[users@httpd] apache "forbidden" error accessing my mrtg files

I'm trying to get Apache to serve up the web pages created by mrtg on my
Linux/Fedora Core 1 system... but I cant figure out why I get
"forbidden" errors from httpd...

$ rpm -q httpd mrtg
httpd-2.0.47-10
mrtg-2.10.5-1

mrtg runs as a daemon as user mrtg (no special privileges), putting its
web page files in /home/mrtg/html. mrtg is running fine, I see the files
get updated regularly.

Apache serves pages from /var/www/html
so I created a symbolic link called mrtg --> /home/mrtg/html
 
Apache is configured to "follow symlinks", and in fact I created another
link in /var/www/html: ln -s ../mrtg mrtgdoc
 
And when I go to http://localhost/mrtgdoc I get the mrtg doc files
displayed properly... so "follow links" works
 
I thought it may have been because there's no index.html file in
/home/mrtg/html and things weren't set up to allow a directory
listing.... so I tried looking at a specific file... same error; then I
created the index.html file ... same error.
 
What I can't figure out is where is this "forbidden" error coming from?
 
>>From root I also changed permission of /home/mrtg to 755 ... nope, still
get the 403 error
 
The documentation for mrtg just says the files have to be in a directory
"visible to apache".... but it doesn't discuss how that's done ....
 
Any suggestions?
 
Thanks,

Don 

        \|/
       (. .)
 ___ooO-(_)-Ooo___

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] apache "forbidden" error accessing my mrtg files

Posted by Don <dn...@san.rr.com>.
"Alias" sounds good.... I'll check that out... but the "debugger in me"
wants to understand why the link doesn't work when other links do.... :-)

Thanks for the tip :-)

Don

  -----Original Message-----
  From: nate [mailto:nate@moontech.org]
  Sent: Monday, November 17, 2003 9:43 AM
  To: users@httpd.apache.org
  Subject: Re: [users@httpd] apache "forbidden" error accessing my mrtg
files


  Hello:

               You don't have to use symbolic links,  Apache has a directive
called Alias that you can use.


  Thank You
  Ezra Taylor


  Luis Moreira wrote:

Hi

    I haven't read the full thread, but here I see

I have a symbolic link in /var/www/html:
mrtgdoc --> ../mrtg

    The "double dot" throws you to the previous level, therefore composing
/var/www/mrtg

    I think...

Luis

----- Original Message -----
From: "Don" <dn...@san.rr.com>
To: <us...@httpd.apache.org>
Sent: Monday, November 17, 2003 3:29 PM
Subject: Re: [users@httpd] apache "forbidden" error accessing my mrtg files


  The error I see in the log file is:
[Mon Nov 17 07:16:14 2003] [error] [client 127.0.0.1] client denied by
server configuration: /var/www/mrtg

That's very interesting, since that's not the directory Apache should
have been trying to get to from my http://localhost/mrtg request...

DocumentRoot is /var/www/html

I have a symbolic link in /var/www/html:
mrtgdoc --> ../mrtg
mrtg --> /home/mrtg/html

It seems when I request directory mrtg, it's trying to give me
/var/www/mrtg instead of /var/www/html/mrtg

So, for an experiment, I created a new link:
mrtgstats --> /home/mrtg/html

Now my browser request http://localhost/mrtgstats works :-)
but browser request http://localhost/mrtg fails with "Forbidden"

both links point to the same place, one works, one doesn't...
Seems like an Apache bug to me... or more likely, a fundamental
misunderstanding on my part.

What's your opinion?
Thanks,
Don

On Mon, 2003-11-17 at 05:11, Jez Hancock wrote:
    On Sun, Nov 16, 2003 at 10:58:33PM -0800, Don wrote:
      I'm trying to get Apache to serve up the web pages created by mrtg on
        my
  Linux/Fedora Core 1 system... but I cant figure out why I get
"forbidden" errors from httpd...
        What error messages do you see in the logs?  Set your LogLevel to
debug
and you should see a reason why the 403 error is produced (usually
something like 'access forbidden by rule...').
      ---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org




Re: [users@httpd] apache "forbidden" error accessing my mrtg files

Posted by nate <na...@moontech.org>.
Hello:

             You don't have to use symbolic links,  Apache has a 
directive called Alias that you can use.


Thank You
Ezra Taylor


Luis Moreira wrote:

>Hi
>
>    I haven't read the full thread, but here I see
>
>I have a symbolic link in /var/www/html:
>mrtgdoc --> ../mrtg
>
>    The "double dot" throws you to the previous level, therefore composing
>/var/www/mrtg
>
>    I think...
>
>Luis
>
>----- Original Message -----
>From: "Don" <dn...@san.rr.com>
>To: <us...@httpd.apache.org>
>Sent: Monday, November 17, 2003 3:29 PM
>Subject: Re: [users@httpd] apache "forbidden" error accessing my mrtg files
>
>
>  
>
>>The error I see in the log file is:
>>[Mon Nov 17 07:16:14 2003] [error] [client 127.0.0.1] client denied by
>>server configuration: /var/www/mrtg
>>
>>That's very interesting, since that's not the directory Apache should
>>have been trying to get to from my http://localhost/mrtg request...
>>
>>DocumentRoot is /var/www/html
>>
>>I have a symbolic link in /var/www/html:
>>mrtgdoc --> ../mrtg
>>mrtg --> /home/mrtg/html
>>
>>It seems when I request directory mrtg, it's trying to give me
>>/var/www/mrtg instead of /var/www/html/mrtg
>>
>>So, for an experiment, I created a new link:
>>mrtgstats --> /home/mrtg/html
>>
>>Now my browser request http://localhost/mrtgstats works :-)
>>but browser request http://localhost/mrtg fails with "Forbidden"
>>
>>both links point to the same place, one works, one doesn't...
>>Seems like an Apache bug to me... or more likely, a fundamental
>>misunderstanding on my part.
>>
>>What's your opinion?
>>Thanks,
>>Don
>>
>>On Mon, 2003-11-17 at 05:11, Jez Hancock wrote:
>>    
>>
>>>On Sun, Nov 16, 2003 at 10:58:33PM -0800, Don wrote:
>>>      
>>>
>>>>I'm trying to get Apache to serve up the web pages created by mrtg on
>>>>        
>>>>
>my
>  
>
>>>>Linux/Fedora Core 1 system... but I cant figure out why I get
>>>>"forbidden" errors from httpd...
>>>>        
>>>>
>>>What error messages do you see in the logs?  Set your LogLevel to debug
>>>and you should see a reason why the 403 error is produced (usually
>>>something like 'access forbidden by rule...').
>>>      
>>>
>>---------------------------------------------------------------------
>>The official User-To-User support forum of the Apache HTTP Server Project.
>>See <URL:http://httpd.apache.org/userslist.html> for more info.
>>To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
>>For additional commands, e-mail: users-help@httpd.apache.org
>>
>>    
>>
>
>
>---------------------------------------------------------------------
>The official User-To-User support forum of the Apache HTTP Server Project.
>See <URL:http://httpd.apache.org/userslist.html> for more info.
>To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
>For additional commands, e-mail: users-help@httpd.apache.org
>
>
>  
>

RE: [users@httpd] apache "forbidden" error accessing my mrtg files

Posted by Don <dn...@san.rr.com>.
Sorry about the typo.....

I don't know why it's not resolvable... but just try the ip address...

http://204.210.29.150/mrtgstats/httpd.conf.txt

Thanks,
Don

> -----Original Message-----
> From: Joshua Slive [mailto:joshua@slive.ca]
> Sent: Monday, November 17, 2003 2:10 PM
> To: users@httpd.apache.org
> Subject: RE: [users@httpd] apache "forbidden" error accessing my mrtg
> files
>
>
>
> On Mon, 17 Nov 2003, Don wrote:
>
> > My apache config file is at
> > http://drussell.dsnalias.com/mrtgstats/httpd.conf.txt
>
> Nope.  I assume you meant dnsalias.com since that doesn't resolve at all.
> But even with the correct domain name, there doesn't seem to be an HTTP
> server at the other end.
>
> Joshua.
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] apache "forbidden" error accessing my mrtg files

Posted by Brian Dessent <br...@dessent.net>.
Don wrote:

> mrtg --> /home/mrtg/html
> mrtgstats --> /home/mrtg/html  (same as above)

So these two links are *exactly* the same but one works and the other
doesn't?  What happens if you make two links "foo" and "bar" to
/home/mrtg/html?  Does a link of arbitrary name work, or is just the
particular one called "mrtg"?  Can you include the output of "ls -l
/var/www/html"?

Brian

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] apache "forbidden" error accessing my mrtg files

Posted by Don <dn...@san.rr.com>.
Brian... you're a genius! :-)
/etc/httpd/conf.d/mrtg.conf is the culprit...

That file sets an alias of /mrtg to /var/www/mrtg

The alias takes precedence over a symbolic link of the same name since
the alias will prevent the request from even going to the DocumentRoot
directory.

This makes sense to me now...

Thanks for the tip to check all the included conf files... :-)

Don



On Mon, 2003-11-17 at 18:12, Brian Dessent wrote:
> Don wrote:
> > 
> > Hi Brian... Thanks for replying.... I don't know if you read the whole
> > thread, but here's a recap..
> > 
> > Apache serves from /var/www/html
> > I have html files in /var/www/mrtg (this is the mrtg doc)
> > I have html files in /home/mrtg/html (this is where mrtg builds it's files)
> > 
> > In /var/www/html I have the follow symblic links
> 
> Oh, and additionally, are there any other conf files in
> /etc/httpd/conf.d?  I suspect that there might be a redhat-supplied mrtg
> alias statement in some included file that's not part of the httpd.conf
> that you posted.
> 
> Brian
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] apache "forbidden" error accessing my mrtg files

Posted by Brian Dessent <br...@dessent.net>.
Don wrote:
> 
> Hi Brian... Thanks for replying.... I don't know if you read the whole
> thread, but here's a recap..
> 
> Apache serves from /var/www/html
> I have html files in /var/www/mrtg (this is the mrtg doc)
> I have html files in /home/mrtg/html (this is where mrtg builds it's files)
> 
> In /var/www/html I have the follow symblic links

Oh, and additionally, are there any other conf files in
/etc/httpd/conf.d?  I suspect that there might be a redhat-supplied mrtg
alias statement in some included file that's not part of the httpd.conf
that you posted.

Brian

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] apache "forbidden" error accessing my mrtg files

Posted by Don <dn...@san.rr.com>.
Hi Brian... Thanks for replying.... I don't know if you read the whole
thread, but here's a recap..

Apache serves from /var/www/html
I have html files in /var/www/mrtg (this is the mrtg doc)
I have html files in /home/mrtg/html (this is where mrtg builds it's files)

In /var/www/html I have the follow symblic links

mrtg --> /home/mrtg/html
mrtgstats --> /home/mrtg/html  (same as above)
mrtgdoc --> ../mrtg

Try each of these and see what you get:
http://drussell.dnsalias.com/mrtg		<-- forbidden
http://drussell.dnsalias.com/mrtgstats	<-- works
http://drussell.dnsalias.com/mrtgdoc	<-- works

I would expect either both of the first two to work, or both to fail. And
based on what you said (below) I'd expect the ref to mrtgdoc to fail as
well.

Don


> -----Original Message-----
> From: Brian Dessent [mailto:brian@dessent.net]
> Sent: Monday, November 17, 2003 4:54 PM
> To: users@httpd.apache.org
> Subject: Re: [users@httpd] apache "forbidden" error accessing my mrtg
> files
>
>
> Don wrote:
>
> > So... corrected URL -->
> > http://drussell.dnsalias.com/mrtgstats/httpd.conf.txt
> >
> > (And I'll have to create a new bug with Cisco for IOS... sigh)
>
> This is not a bug, Apache is not allowing you to serve pages from
> /home/mrtg/html because you have not specified in httpd.conf that this
> is permitted.  You would not random unspecified directories to be
> available to web users, would you?
>
> You would need to add something like:
>
> <Directory /home/mrtg/html>
>    Order allow,deny
>    Allow from all
> </Directory>
>
> Brian
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] apache "forbidden" error accessing my mrtg files

Posted by Brian Dessent <br...@dessent.net>.
Don wrote:

> So... corrected URL -->
> http://drussell.dnsalias.com/mrtgstats/httpd.conf.txt
> 
> (And I'll have to create a new bug with Cisco for IOS... sigh)

This is not a bug, Apache is not allowing you to serve pages from
/home/mrtg/html because you have not specified in httpd.conf that this
is permitted.  You would not random unspecified directories to be
available to web users, would you?

You would need to add something like:

<Directory /home/mrtg/html>
   Order allow,deny
   Allow from all
</Directory>

Brian

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] apache "forbidden" error accessing my mrtg files

Posted by Don <dn...@san.rr.com>.
Joshua,

Very interesting... over the week end I loaded a new IOS in my Cisco
router.... I just went to www.grc.com and ran their "shields up" port scan
test and every port on my system showed as "stealth"....

I just reloaded the previous IOS version, went back to grc.com and now my
http port is open again...

So... corrected URL -->
http://drussell.dnsalias.com/mrtgstats/httpd.conf.txt

(And I'll have to create a new bug with Cisco for IOS... sigh)



> -----Original Message-----
> From: Joshua Slive [mailto:joshua@slive.ca]
> Sent: Monday, November 17, 2003 2:10 PM
> To: users@httpd.apache.org
> Subject: RE: [users@httpd] apache "forbidden" error accessing my mrtg
> files
>
>
>
> On Mon, 17 Nov 2003, Don wrote:
>
> > My apache config file is at
> > http://drussell.dsnalias.com/mrtgstats/httpd.conf.txt
>
> Nope.  I assume you meant dnsalias.com since that doesn't resolve at all.
> But even with the correct domain name, there doesn't seem to be an HTTP
> server at the other end.
>
> Joshua.
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] apache "forbidden" error accessing my mrtg files

Posted by Joshua Slive <jo...@slive.ca>.
On Mon, 17 Nov 2003, Don wrote:

> My apache config file is at
> http://drussell.dsnalias.com/mrtgstats/httpd.conf.txt

Nope.  I assume you meant dnsalias.com since that doesn't resolve at all.
But even with the correct domain name, there doesn't seem to be an HTTP
server at the other end.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] apache "forbidden" error accessing my mrtg files

Posted by Don <dn...@san.rr.com>.
My apache config file is at
http://drussell.dsnalias.com/mrtgstats/httpd.conf.txt

Thanks,
Don

> -----Original Message-----
> From: Joshua Slive [mailto:joshua@slive.ca]
> Sent: Monday, November 17, 2003 1:06 PM
> To: users@httpd.apache.org
> Cc: Luis Moreira
> Subject: RE: [users@httpd] apache "forbidden" error accessing my mrtg
> files
>
>
>
> On Mon, 17 Nov 2003, Don wrote:
> > http://localhost/mrtg fails with a "forbidden" response
> > http://localhost/mrtgdoc displays the mrtg documentation (from
> /var/www/mrtg
> > since that's where the symlink points)
> > http://localhost/mrtgstats displays the mrtg status pages (from
> > /home/mrtg/html, because that's where the link points)
> >
> > This tells me that the mrtg link is not being followed
> properly... somehow
> > Apache thought I was trying to get to /var/www/mrtg directly
> and it replied
> > "forbidden".
> >
> > Question is, why? It's as if it found "mrtg" in the /var/www
> tree and tried
> > to access it instead of continuing on to /var/www/html/mrtg...
>
> Put you httpd.conf on a publically-available website so we can have a look
> at it.  I bet you've got a simple config error someplace.
>
> Joshua.
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] apache "forbidden" error accessing my mrtg files

Posted by Joshua Slive <jo...@slive.ca>.
On Mon, 17 Nov 2003, Don wrote:
> http://localhost/mrtg fails with a "forbidden" response
> http://localhost/mrtgdoc displays the mrtg documentation (from /var/www/mrtg
> since that's where the symlink points)
> http://localhost/mrtgstats displays the mrtg status pages (from
> /home/mrtg/html, because that's where the link points)
>
> This tells me that the mrtg link is not being followed properly... somehow
> Apache thought I was trying to get to /var/www/mrtg directly and it replied
> "forbidden".
>
> Question is, why? It's as if it found "mrtg" in the /var/www tree and tried
> to access it instead of continuing on to /var/www/html/mrtg...

Put you httpd.conf on a publically-available website so we can have a look
at it.  I bet you've got a simple config error someplace.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] apache "forbidden" error accessing my mrtg files

Posted by Don <dn...@san.rr.com>.
That's correct... and in that case, it's exactly what I want.

Seems all the mrtg doc in html format got installed at /var/www/mrtg
Apache serves my files from /var/www/html

in /var/www/html I put some symbolic links

mrtgdoc --> ../mrtg
mrtg --> /home/mrtg/html
mrtgstats --> /home/mrtg/html

Note the mrtg link and the mrtgstats link point to the same place

http://localhost/mrtg fails with a "forbidden" response
http://localhost/mrtgdoc displays the mrtg documentation (from /var/www/mrtg
since that's where the symlink points)
http://localhost/mrtgstats displays the mrtg status pages (from
/home/mrtg/html, because that's where the link points)

This tells me that the mrtg link is not being followed properly... somehow
Apache thought I was trying to get to /var/www/mrtg directly and it replied
"forbidden".

Question is, why? It's as if it found "mrtg" in the /var/www tree and tried
to access it instead of continuing on to /var/www/html/mrtg...

Don


> -----Original Message-----
> From: Luis Moreira [mailto:lamoreira@bes.pt]
> Sent: Monday, November 17, 2003 8:14 AM
> To: users@httpd.apache.org
> Subject: Re: [users@httpd] apache "forbidden" error accessing my mrtg
> files
>
>
> Hi
>
>     I haven't read the full thread, but here I see
>
> I have a symbolic link in /var/www/html:
> mrtgdoc --> ../mrtg
>
>     The "double dot" throws you to the previous level, therefore composing
> /var/www/mrtg
>
>     I think...
>
> Luis
>
> ----- Original Message -----
> From: "Don" <dn...@san.rr.com>
> To: <us...@httpd.apache.org>
> Sent: Monday, November 17, 2003 3:29 PM
> Subject: Re: [users@httpd] apache "forbidden" error accessing my
> mrtg files
>
>
> > The error I see in the log file is:
> > [Mon Nov 17 07:16:14 2003] [error] [client 127.0.0.1] client denied by
> > server configuration: /var/www/mrtg
> >
> > That's very interesting, since that's not the directory Apache should
> > have been trying to get to from my http://localhost/mrtg request...
> >
> > DocumentRoot is /var/www/html
> >
> > I have a symbolic link in /var/www/html:
> > mrtgdoc --> ../mrtg
> > mrtg --> /home/mrtg/html
> >
> > It seems when I request directory mrtg, it's trying to give me
> > /var/www/mrtg instead of /var/www/html/mrtg
> >
> > So, for an experiment, I created a new link:
> > mrtgstats --> /home/mrtg/html
> >
> > Now my browser request http://localhost/mrtgstats works :-)
> > but browser request http://localhost/mrtg fails with "Forbidden"
> >
> > both links point to the same place, one works, one doesn't...
> > Seems like an Apache bug to me... or more likely, a fundamental
> > misunderstanding on my part.
> >
> > What's your opinion?
> > Thanks,
> > Don
> >
> > On Mon, 2003-11-17 at 05:11, Jez Hancock wrote:
> > > On Sun, Nov 16, 2003 at 10:58:33PM -0800, Don wrote:
> > > > I'm trying to get Apache to serve up the web pages created
> by mrtg on
> my
> > > > Linux/Fedora Core 1 system... but I cant figure out why I get
> > > > "forbidden" errors from httpd...
> > > What error messages do you see in the logs?  Set your
> LogLevel to debug
> > > and you should see a reason why the 403 error is produced (usually
> > > something like 'access forbidden by rule...').
> >
> > ---------------------------------------------------------------------
> > The official User-To-User support forum of the Apache HTTP
> Server Project.
> > See <URL:http://httpd.apache.org/userslist.html> for more info.
> > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> >    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> > For additional commands, e-mail: users-help@httpd.apache.org
> >
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] apache "forbidden" error accessing my mrtg files

Posted by Luis Moreira <la...@bes.pt>.
Hi

    I haven't read the full thread, but here I see

I have a symbolic link in /var/www/html:
mrtgdoc --> ../mrtg

    The "double dot" throws you to the previous level, therefore composing
/var/www/mrtg

    I think...

Luis

----- Original Message -----
From: "Don" <dn...@san.rr.com>
To: <us...@httpd.apache.org>
Sent: Monday, November 17, 2003 3:29 PM
Subject: Re: [users@httpd] apache "forbidden" error accessing my mrtg files


> The error I see in the log file is:
> [Mon Nov 17 07:16:14 2003] [error] [client 127.0.0.1] client denied by
> server configuration: /var/www/mrtg
>
> That's very interesting, since that's not the directory Apache should
> have been trying to get to from my http://localhost/mrtg request...
>
> DocumentRoot is /var/www/html
>
> I have a symbolic link in /var/www/html:
> mrtgdoc --> ../mrtg
> mrtg --> /home/mrtg/html
>
> It seems when I request directory mrtg, it's trying to give me
> /var/www/mrtg instead of /var/www/html/mrtg
>
> So, for an experiment, I created a new link:
> mrtgstats --> /home/mrtg/html
>
> Now my browser request http://localhost/mrtgstats works :-)
> but browser request http://localhost/mrtg fails with "Forbidden"
>
> both links point to the same place, one works, one doesn't...
> Seems like an Apache bug to me... or more likely, a fundamental
> misunderstanding on my part.
>
> What's your opinion?
> Thanks,
> Don
>
> On Mon, 2003-11-17 at 05:11, Jez Hancock wrote:
> > On Sun, Nov 16, 2003 at 10:58:33PM -0800, Don wrote:
> > > I'm trying to get Apache to serve up the web pages created by mrtg on
my
> > > Linux/Fedora Core 1 system... but I cant figure out why I get
> > > "forbidden" errors from httpd...
> > What error messages do you see in the logs?  Set your LogLevel to debug
> > and you should see a reason why the 403 error is produced (usually
> > something like 'access forbidden by rule...').
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] apache "forbidden" error accessing my mrtg files

Posted by Don <dn...@san.rr.com>.
The error I see in the log file is:
[Mon Nov 17 07:16:14 2003] [error] [client 127.0.0.1] client denied by
server configuration: /var/www/mrtg

That's very interesting, since that's not the directory Apache should
have been trying to get to from my http://localhost/mrtg request...

DocumentRoot is /var/www/html

I have a symbolic link in /var/www/html:
	mrtgdoc --> ../mrtg
	mrtg --> /home/mrtg/html

It seems when I request directory mrtg, it's trying to give me
/var/www/mrtg instead of /var/www/html/mrtg

So, for an experiment, I created a new link:
	mrtgstats --> /home/mrtg/html

Now my browser request http://localhost/mrtgstats works :-)
but browser request http://localhost/mrtg fails with "Forbidden"

both links point to the same place, one works, one doesn't... 
Seems like an Apache bug to me... or more likely, a fundamental
misunderstanding on my part.

What's your opinion?
Thanks,
Don

On Mon, 2003-11-17 at 05:11, Jez Hancock wrote:
> On Sun, Nov 16, 2003 at 10:58:33PM -0800, Don wrote:
> > I'm trying to get Apache to serve up the web pages created by mrtg on my
> > Linux/Fedora Core 1 system... but I cant figure out why I get
> > "forbidden" errors from httpd...
> What error messages do you see in the logs?  Set your LogLevel to debug
> and you should see a reason why the 403 error is produced (usually
> something like 'access forbidden by rule...').

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] apache "forbidden" error accessing my mrtg files

Posted by Jez Hancock <je...@munk.nu>.
On Sun, Nov 16, 2003 at 10:58:33PM -0800, Don wrote:
> I'm trying to get Apache to serve up the web pages created by mrtg on my
> Linux/Fedora Core 1 system... but I cant figure out why I get
> "forbidden" errors from httpd...
What error messages do you see in the logs?  Set your LogLevel to debug
and you should see a reason why the 403 error is produced (usually
something like 'access forbidden by rule...').

-- 
Jez Hancock
 - System Administrator / PHP Developer

http://munk.nu/

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] apache "forbidden" error accessing my mrtg files

Posted by Don <dn...@san.rr.com>.
Kyle,
The permission are 755.... but I discovered that by using a different
symbolic link name, it now works...

where I used to have mrtg --> home/mrtg/html
I now have mrtgstats --> home/mrtg/html

note: there is a directory called /var/www/mrtg as well as /var/www/html

It seems having a symbolic link with the same name as a directory at the
same level as the "DocumentRoot" directory causes a problem.

Don


On Mon, 2003-11-17 at 05:57, Kyle Dent wrote:
> On Sun, 16 Nov 2003, Don wrote:
> 
> > I'm trying to get Apache to serve up the web pages created by mrtg on my
> > Linux/Fedora Core 1 system... but I cant figure out why I get
> > "forbidden" errors from httpd...
> >
> > $ rpm -q httpd mrtg
> > httpd-2.0.47-10
> > mrtg-2.10.5-1
> >
> > mrtg runs as a daemon as user mrtg (no special privileges), putting its
> > web page files in /home/mrtg/html. mrtg is running fine, I see the files
> > get updated regularly.
> >
> > Apache serves pages from /var/www/html
> > so I created a symbolic link called mrtg --> /home/mrtg/html
> >
> > Apache is configured to "follow symlinks", and in fact I created another
> > link in /var/www/html: ln -s ../mrtg mrtgdoc
> >
> > And when I go to http://localhost/mrtgdoc I get the mrtg doc files
> > displayed properly... so "follow links" works
> >
> > I thought it may have been because there's no index.html file in
> > /home/mrtg/html and things weren't set up to allow a directory
> > listing.... so I tried looking at a specific file... same error; then I
> > created the index.html file ... same error.
> >
> > What I can't figure out is where is this "forbidden" error coming from?
> >
> > >From root I also changed permission of /home/mrtg to 755 ... nope, still
> > get the 403 error
> >
> > The documentation for mrtg just says the files have to be in a directory
> > "visible to apache".... but it doesn't discuss how that's done ....
> 
> What are the permissions on the directory /home/mrtg/html and the
> files there?
> 
> Kyle
> 
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] apache "forbidden" error accessing my mrtg files

Posted by Kyle Dent <kd...@seaglass.com>.
On Sun, 16 Nov 2003, Don wrote:

> I'm trying to get Apache to serve up the web pages created by mrtg on my
> Linux/Fedora Core 1 system... but I cant figure out why I get
> "forbidden" errors from httpd...
>
> $ rpm -q httpd mrtg
> httpd-2.0.47-10
> mrtg-2.10.5-1
>
> mrtg runs as a daemon as user mrtg (no special privileges), putting its
> web page files in /home/mrtg/html. mrtg is running fine, I see the files
> get updated regularly.
>
> Apache serves pages from /var/www/html
> so I created a symbolic link called mrtg --> /home/mrtg/html
>
> Apache is configured to "follow symlinks", and in fact I created another
> link in /var/www/html: ln -s ../mrtg mrtgdoc
>
> And when I go to http://localhost/mrtgdoc I get the mrtg doc files
> displayed properly... so "follow links" works
>
> I thought it may have been because there's no index.html file in
> /home/mrtg/html and things weren't set up to allow a directory
> listing.... so I tried looking at a specific file... same error; then I
> created the index.html file ... same error.
>
> What I can't figure out is where is this "forbidden" error coming from?
>
> >From root I also changed permission of /home/mrtg to 755 ... nope, still
> get the 403 error
>
> The documentation for mrtg just says the files have to be in a directory
> "visible to apache".... but it doesn't discuss how that's done ....

What are the permissions on the directory /home/mrtg/html and the
files there?

Kyle


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org