LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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


Reply
  Search this Thread
Old 10-04-2012, 09:29 AM   #1
Sharath Ravi
Member
 
Registered: Jun 2012
Posts: 37

Rep: Reputation: Disabled
Mrtg configuration


Hi,

I installed Mrtg successfully on Centos 5. When i am trying to access from web browser

Forbidden

You don't have permission to access /mrtg on this server.

I have tried giving full these permission

chown -R root:root /var/www/html/mrtg/
chown -R apache:apache /var/www/html/mrtg/
chmod 777 /var/www/html/mrtg/*

edited in http conf file like

Alias /mrtg "/var/www/html/mrtg"
<Directory "/var/www/html/mrtg">
AllowOverride All
Allow from All
Options FollowSymLinks
DirectoryIndex index.html
</Directory>

But still i am getting this error. Please help me out on this.
 
Old 10-04-2012, 05:12 PM   #2
porphyry5
Member
 
Registered: Jul 2010
Location: oregon usa
Distribution: Slackware 14.1, Arch
Posts: 443

Rep: Reputation: 21
Quote:
Originally Posted by Sharath Ravi View Post
Hi,

I installed Mrtg successfully on Centos 5. When i am trying to access from web browser

Forbidden

You don't have permission to access /mrtg on this server.

I have tried giving full these permission

chown -R root:root /var/www/html/mrtg/
chown -R apache:apache /var/www/html/mrtg/
chmod 777 /var/www/html/mrtg/*

edited in http conf file like

Alias /mrtg "/var/www/html/mrtg"
<Directory "/var/www/html/mrtg">
AllowOverride All
Allow from All
Options FollowSymLinks
DirectoryIndex index.html
</Directory>

But still i am getting this error. Please help me out on this.
I believe the username and group, that you are logged in as, has to be the same as the current owner and group shown for /var/www/html/mrtg/ for you to be able to use chown on it, and I would think that is not so and is why your browser says it is Forbidden.
Code:
ls -l /var/www/html/mrtg/
would show the current owner and group.

Last edited by porphyry5; 10-04-2012 at 05:13 PM.
 
Old 10-04-2012, 05:36 PM   #3
Habitual
LQ Addict
 
Registered: Jan 2011
Location: Youngstown, Ohio
Distribution: LM17.1/Xfce4.11.8
Posts: 7,179
Blog Entries: 10

Rep: Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980
Quote:
Originally Posted by Sharath Ravi View Post
...
chmod 777 /var/www/html/mrtg/*
Some advice:
This is NEVER, ever a solution to "You don't have permission to access /mrtg on this server." It is very bad form.

And why did you change owners twice on the same directory?

I am not flaming you, I am just trying to correct a bad habit.

Peace.
 
Old 10-05-2012, 01:39 AM   #4
Sharath Ravi
Member
 
Registered: Jun 2012
Posts: 37

Original Poster
Rep: Reputation: Disabled
@Habitual thanks will follow your advice
@porphyry5 i have given full permission and made Apache user as the owner still

Forbidden

You don't have permission to access /mrtg on this server.

Thanks
 
Old 10-05-2012, 03:14 AM   #5
jsaravana87
Member
 
Registered: Aug 2011
Location: Chennai,India
Distribution: Redhat,Centos,Ubuntu,Dedian
Posts: 558
Blog Entries: 5

Rep: Reputation: Disabled
Hi
Can you post your apache log to find out the exact problem . /var/log/httpd/error.log
 
Old 10-05-2012, 03:36 AM   #6
Sharath Ravi
Member
 
Registered: Jun 2012
Posts: 37

Original Poster
Rep: Reputation: Disabled
@Arun

[Fri Oct 05 12:58:01 2012] [error] [client 192.168.21.1] client denied by server configuration: /var/www/html/mrtg

Thanks
 
Old 10-05-2012, 03:56 AM   #7
jsaravana87
Member
 
Registered: Aug 2011
Location: Chennai,India
Distribution: Redhat,Centos,Ubuntu,Dedian
Posts: 558
Blog Entries: 5

Rep: Reputation: Disabled
Hi
Can you post your /etc/httpd/conf.d/mrtg.conf configuration file. I Guess mrtg configuration file is pointing to /var/www instead of /var/www/html
 
Old 10-05-2012, 04:42 AM   #8
Sharath Ravi
Member
 
Registered: Jun 2012
Posts: 37

Original Poster
Rep: Reputation: Disabled
@Arun

Alias /mrtg /var/www/html/mrtg

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

Thanks
 
Old 10-05-2012, 04:58 AM   #9
jsaravana87
Member
 
Registered: Aug 2011
Location: Chennai,India
Distribution: Redhat,Centos,Ubuntu,Dedian
Posts: 558
Blog Entries: 5

Rep: Reputation: Disabled
Hi
Umcomment the configuration file in /etc/httpd/conf.d/mrtg.conf

Alias /mrtg /var/www/html/mrtg
#<Location /mrtg>
#Order deny,allow
#Deny from all
#Allow from 127.0.0.1
#Allow from ::1
# Allow from .example.com

Then restart apache and check out whether you can connect to the application
 
Old 10-05-2012, 05:21 AM   #10
Sharath Ravi
Member
 
Registered: Jun 2012
Posts: 37

Original Poster
Rep: Reputation: Disabled
Arun

When i am doing that if i restarting http

Syntax error on line 209 of /etc/httpd/conf/httpd.conf: Syntax error on line 14 of /etc/httpd/conf.d/mrtg.conf: </Location> without matching <Location> section

This error
 
Old 10-05-2012, 05:29 AM   #11
jsaravana87
Member
 
Registered: Aug 2011
Location: Chennai,India
Distribution: Redhat,Centos,Ubuntu,Dedian
Posts: 558
Blog Entries: 5

Rep: Reputation: Disabled
Hi sharath


Default Mrtg configuartion file will be listening to localhost .If you want to access on remote hosts you have to uncomment the mrtg configuration file which is listening to localhost

Post your full mrtg.conf file.

Problem is 14 line of /etc/httpd/conf.d/mrtg.conf file
 
Old 10-05-2012, 05:41 AM   #12
Sharath Ravi
Member
 
Registered: Jun 2012
Posts: 37

Original Poster
Rep: Reputation: Disabled
Arun,


These are the full data in this conf file

# 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/html/mrtg

<Location /mrtg>
Order deny,allow
Deny from all
Allow from 127.0.0.1
Allow from ::1
Allow from .example.com
</Location>
~
~
Only this much.

Thanks
 
Old 10-05-2012, 05:53 AM   #13
jsaravana87
Member
 
Registered: Aug 2011
Location: Chennai,India
Distribution: Redhat,Centos,Ubuntu,Dedian
Posts: 558
Blog Entries: 5

Rep: Reputation: Disabled
hI

Just modify the configuration file as below just Alias /mrtg /var/www/html/mrtg to be uncommented.I guess you have not commented out </Location> of line 14 of mrtg.conf file


# 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/html/mrtg

#<Location /mrtg>
#Order deny,allow
#Deny from all
#Allow from 127.0.0.1
#Allow from ::1
#Allow from .example.com
#</Location>
 
1 members found this post helpful.
Old 10-05-2012, 06:00 AM   #14
Sharath Ravi
Member
 
Registered: Jun 2012
Posts: 37

Original Poster
Rep: Reputation: Disabled
Hey Arun,

Sorry has missed that last line as u mentioned was not commented.

Thank u very much man. It worked.... thank u so so so much....
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
MRTG configuration..!! nitin-saxena Linux - Software 0 09-28-2006 05:18 AM
MRTG configuration issues !!! ALInux Linux - Networking 1 12-10-2005 10:02 AM
MRTG configuration sandeep2005 Linux - General 0 11-17-2005 12:47 AM
MRTG Configuration Problem JJX Linux - Software 4 06-03-2004 05:12 PM
MRTG Configuration Help Needed oaaltone Linux - Software 2 04-01-2003 03:16 PM


All times are GMT -5. The time now is 12:57 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration