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-05-2006, 04:39 AM   #1
Braynid
Member
 
Registered: May 2006
Location: Romania
Distribution: CentOS
Posts: 140

Rep: Reputation: 15
Unhappy Another cacti problem


Hey guys,
For some 4 months i've got this idea of installing cacti on my ubuntu 6.06 server. I even tried it a coupe of times but no luck...

So, i have tried to compile it manually but i've got some problems with some additional packages, so i used the mighty
Code:
apt-get install cacti
. The deed is done but i still get nothing when i try http://host.com/cacti. Now i think the problem is that the cacti install is not in the apache path (/var/www/) with 'slocate cacti' i get these folders:
Code:
/var/lib/mysql/cacti/ 
/usr/share/doc/cacti/ 
/usr/share/cacti
When i try http://host.com/cacti i get:
Code:
Forbidden

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

Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.
Apache/2.0.55 (Ubuntu) PHP/5.1.2 mod_ssl/2.0.55 OpenSSL/0.9.8a Server at **.**.**.*** Port 80
So what is to be done?
 
Old 10-05-2006, 05:29 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
don't take this as the defacto way of dealing with this, cacti might tell you a different way that they are dealing with this, but essentially.....

you're getting that error message because the apache httpd.conf does not define that the http server is allowed to access that locatino, ie.. a location outside of /var/www. to do this you would typically edit httpd.conf and add a section similar too...
Code:
<Directory "/usr/share/cacti">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>
now this assumes that you already have a symlink from /var/www/html/cacti to /usr/share/cacti (i.e. the place where apache is trying to go to reach that cacti directory. that's my assumption though, not a step you need to take...
 
1 members found this post helpful.
Old 10-05-2006, 05:51 AM   #3
Braynid
Member
 
Registered: May 2006
Location: Romania
Distribution: CentOS
Posts: 140

Original Poster
Rep: Reputation: 15
Hmm, i have tried the above given steps and stil nothing.
i have tried both:
http://host.com/cacti
and with 'http://host.com/usr/share/cacti' (how dumb of me to try this) i get:
Code:
Object not found!

The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.

If you think this is a server error, please contact the webmaster.
Error 404
Thu Oct 5 12:43:40 2006
Apache/2.0.55 (Ubuntu) PHP/5.1.2 mod_ssl/2.0.55 OpenSSL/0.9.8a
Should i restart the Apache? If yes, how?

UPDATE:
In '/etc/cacti' i've found 'apache.conf' which contains the following:

Code:
Alias /cacti /usr/share/cacti

<DirectoryMatch /usr/share/cacti/>
        Options +FollowSymLinks
        AllowOverride None
        order allow,deny
        allow from all
        <IfModule mod_php4.c>
                AddType application/x-httpd-php .php
                php_flag magic_quotes_gpc Off
                php_flag short_open_tag On
                php_flag register_globals On
                php_flag register_argc_argv On
                php_flag track_vars On
                php_value include_path .
                DirectoryIndex index.php
        </IfModule>
</DirectoryMatch>
Should this be moved in the apache.conf ? or what...

Last edited by Braynid; 10-05-2006 at 06:06 AM.
 
Old 10-05-2006, 06:17 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
ahh right yeah, this fits in well with my disclaimer. well what apache and packages using apache have been moving towards is driectory based configuration files, not a single file. i.e. a new app has apache config, so dumps it in /etc/httpd/conf.d/myfile.conf rather than in the formal httpd.conf. this makes things an awful lot simpler for everyone. what you might have here is a symlink to that file from a directroy like conf.d. if not either copy it to there or add your own symlink. if there appears to be no such directory (or a bit like
Code:
# Load config files from the config directory "/etc/httpd/conf.d".
Include conf.d/*.conf
in your httpd.conf then you would be looking at either creating it, or pasting that config directly to the file.
 
Old 10-05-2006, 06:51 AM   #5
Braynid
Member
 
Registered: May 2006
Location: Romania
Distribution: CentOS
Posts: 140

Original Poster
Rep: Reputation: 15
Herein lies the dilema, i have pasted the code in '/etc/apache2/httpd.conf' and yet the same result. Again, should i restart the apache server? How do i reset the apache server?

i've found something like:
Quote:
apachectl -k graceful
It's from the apache manual.

Q: Should i add code to: '/usr/share/apache/default-configs/apache/httpd.conf' or to '/etc/apache2/httpd.conf' ?

Last edited by Braynid; 10-05-2006 at 06:58 AM.
 
Old 10-05-2006, 07:20 AM   #6
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
yep, use graceful. the default-configs stuff is going to be for reference only, it won't be a live config file.
 
Old 10-05-2006, 07:26 AM   #7
Braynid
Member
 
Registered: May 2006
Location: Romania
Distribution: CentOS
Posts: 140

Original Poster
Rep: Reputation: 15
Ok, with the wonder of google i've manage to find 'apache -k restart'.
First it gave me this:
Code:
[Thu Oct 05 14:15:09 2006] [warn] The Alias directive in /etc/apache2/conf.d/alias at line 1 will probably never match because it overlaps an earlier Alias.
[Thu Oct 05 14:15:09 2006] [warn] The Alias directive in /etc/apache2/conf.d/cacti.conf at line 1 will probably never match because it overlaps an earlier Alias.
After i have deleted the lines in '/etc/apache2/conf.d/alias' (it was the previous version of cacti that i tried to compile manually) it gave me in browser this new cute error:
Code:
Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'cacti'@'localhost' (using password: YES) in /usr/share/adodb/drivers/adodb-mysql.inc.php on line 319

Cannot connect to MySQL server on 'localhost'. Please make sure you have specified a valid MySQL database name in 'include/config.php'.
 
Old 10-05-2006, 07:30 AM   #8
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
ok well that's fine then yeah? apache problem over. i'd request a seperate thread if you wish to get help for that, as that's really going to be unrelated to the original question.
 
Old 10-05-2006, 07:35 AM   #9
Braynid
Member
 
Registered: May 2006
Location: Romania
Distribution: CentOS
Posts: 140

Original Poster
Rep: Reputation: 15
Right you are, i'll do that right now! Thanks for the kind support!
 
  


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
Cacti Problem mblames Fedora 3 08-20-2007 05:42 AM
SNMP not in use - Cacti Zetec Ubuntu 2 07-16-2006 04:49 PM
Installing cacti Braynid Linux - Newbie 4 06-13-2006 01:55 PM
Problem with cacti. ARCIS_house Linux - Newbie 1 05-26-2006 03:20 AM
raxnet cacti madhaquer Slackware 1 11-10-2003 02:33 PM


All times are GMT -5. The time now is 10:34 AM.

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