LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Another cacti problem (https://www.linuxquestions.org/questions/linux-newbie-8/another-cacti-problem-489619/)

Braynid 10-05-2006 03:39 AM

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?

acid_kewpie 10-05-2006 04:29 AM

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...

Braynid 10-05-2006 04:51 AM

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...

acid_kewpie 10-05-2006 05:17 AM

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.

Braynid 10-05-2006 05:51 AM

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' ?

acid_kewpie 10-05-2006 06:20 AM

yep, use graceful. the default-configs stuff is going to be for reference only, it won't be a live config file.

Braynid 10-05-2006 06:26 AM

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'.


acid_kewpie 10-05-2006 06:30 AM

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.

Braynid 10-05-2006 06:35 AM

Right you are, i'll do that right now! Thanks for the kind support!


All times are GMT -5. The time now is 09:20 AM.