LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Apache web access "Forbidden" (https://www.linuxquestions.org/questions/linux-software-2/apache-web-access-forbidden-156825/)

wswartz 03-18-2004 07:33 AM

Thank you very much!!! That was it. I changed the Deny from All to Allow and it works fine. One last parting comment that doesn't require a response (just thinking out loud). If this configuration is supposed to deny access from anyone other than the localhost, why didn't it work for me all along? I've been testing this with 127.0.0.1 (localhost) all along.

Anyway, thanks for helping with this.

W.

ventz 06-15-2004 01:04 AM

Another similar error
 
I was actually kicking the crap out of google trying to find the same error, and i realized that you can't symlink/use "usage" as the keyword for a directory. It ALWAYS gives some kind of a forbiden error. It doesn't matter if I create it, link it, symlinks it, etc..

Just my small comment for someone who like me will spend a good 3 hours.

egarnel 07-28-2004 11:25 AM

mrtg access forbidden
 
I too ran into this on Redhat AS 3.0 mrtg 2.9.29 ent

tried all the above stuff also to no avail.

I fixed it by renaming /var/www/html/mrtg to /var/www/html/mama (totally arbitrary) and then changed the dir path in mrtg.cfg to reflect the new name.

I have no idea why or what was blocking access to mrtg, but this is a feasable work-around

Mogh 01-20-2005 03:45 PM

I spent about 3 hours on this including searching the web until I found this thread. The PC I had mrtg on was originally Redhat 8.0. I wiped that PC out, installed CentOS 3.4 (RHEL3 U4) and just copied back my mrtg files to /var/www/html/mrtg and mrtg.cfg into /etc/mrtg.

I ended up with the same problem since I had no idea the newer OS adds a
a /etc/httpd/conf.d/mrtg.conf to the apache config. I just removed the mrtg.conf and all is fine, however I could have just done the same thing as the OP and unrestricted the settings in mrtg.conf.

ellecramron 06-24-2005 01:34 PM

Apache web access "Forbidden"
 
I have had this same problem and spent considerable amount of time on it to find that the solution was actually an easy remedy. My access was forbidden to a single folder in /var/www/html/ but to other folders and files I was permitted to view them. The folder I couldn't view was one that was one that had previously been unzipped the rest never had to be (I created them). So create a new folder name it the same as the forbidden one and copy and paste the files into the new folder and it works fine.

etegration 10-26-2011 06:48 PM

Quote:

Originally Posted by egarnel (Post 1074305)
I too ran into this on Redhat AS 3.0 mrtg 2.9.29 ent

tried all the above stuff also to no avail.

I fixed it by renaming /var/www/html/mrtg to /var/www/html/mama (totally arbitrary) and then changed the dir path in mrtg.cfg to reflect the new name.

I have no idea why or what was blocking access to mrtg, but this is a feasable work-around

sorry to dig up this old thread. In the past, it has worked for me to change the Deny all to Allow all in /etc/mrtg/mrtg.cfg but this time round, with Fedora 14m it does not work for me anymore.

Firewalls/ SELinux has been disabled.

Quote:

#
# This configuration file maps the mrtg output (generated daily)
# into the URL space. By default these results are only accessible
# from the local host.
#
Alias /mrtg /var/www/mrtg

<Location /mrtg>
Order deny,allow
Allow from all
Allow from 127.0.0.1
Allow from ::1
# Allow from .example.com
</Location>


etegration 10-27-2011 10:52 AM

I've given up too.

/var/www/mrtg is mapped to /etc/mrtg i guess but some permission error is going on somewhere. Adding the below
Quote:

<Directory "/var/www/mrtg">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>

To Apache config file displays the directory /var/www/html/mrtg but the html files output by MRTG is not there.

Code:

...
<Directory />
    Options FollowSymLinks
    AllowOverride All
</Directory>

<Directory "/var/www/mrtg">
    Options Indexes FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>

#
# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# below.
#

#
# This should be changed to whatever you set DocumentRoot to.
#
<Directory "/var/www/html">
...

As many has tried successfully, i simply copied /var/www/html/mrtg/* to /var/www/html/mrtg1/ and load the html files from there. It works so F it. I'm sticking to this for now.


All times are GMT -5. The time now is 02:06 AM.