Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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:
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
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...
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...
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.
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?
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'.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.