Change Cacti URL
Moderators: Developers, Moderators
-
- Cacti Pro User
- Posts: 613
- Joined: Tue Aug 29, 2006 4:09 pm
- Location: NL
Re: Change Cacti URL
If I remember correctly, the later Cacti's have a $url_path in include/config.php If you set that to / you get what you want.
Maintainer of cacti in Debian (and Ubuntu).
Cacti 1.* is now officially supported on Debian Stretch via Debian backports
FAQ Ubuntu and Debian differences
Generic cacti debugging
Cacti 1.* is now officially supported on Debian Stretch via Debian backports
FAQ Ubuntu and Debian differences
Generic cacti debugging
Re: Change Cacti URL
I found the config.php file /usr/share/cacti/site/include and in the config file there is no $url_path.
This is all I see:
<?php
/*
+-------------------------------------------------------------------------+
| Copyright (C) 2004-2011 The Cacti Group |
| |
| This program is free software; you can redistribute it and/or |
| modify it under the terms of the GNU General Public License |
| as published by the Free Software Foundation; either version 2 |
| of the License, or (at your option) any later version. |
| |
| This program is distributed in the hope that it will be useful, |
| but WITHOUT ANY WARRANTY; without even the implied warranty of |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| GNU General Public License for more details. |
+-------------------------------------------------------------------------+
| Cacti: The Complete RRDTool-based Graphing Solution |
+-------------------------------------------------------------------------+
| This code is designed, written, and maintained by the Cacti Group. See |
| about.php and/or the AUTHORS file for specific developer information. |
+-------------------------------------------------------------------------+
| http://www.cacti.net/ |
+-------------------------------------------------------------------------+
*/
/* make sure these values refect your actual database/host/user/password */
$database_type = "mysql";
$database_default = "cacti";
$database_hostname = "localhost";
$database_username = "cactiuser";
$database_password = "cactiuser";
$database_port = "3306";
$database_ssl = false;
/* Default session name - Session name must contain alpha characters */
#$cacti_session_name = "Cacti";
?>
Thanks for the help, but I am not seeing it.
This is all I see:
<?php
/*
+-------------------------------------------------------------------------+
| Copyright (C) 2004-2011 The Cacti Group |
| |
| This program is free software; you can redistribute it and/or |
| modify it under the terms of the GNU General Public License |
| as published by the Free Software Foundation; either version 2 |
| of the License, or (at your option) any later version. |
| |
| This program is distributed in the hope that it will be useful, |
| but WITHOUT ANY WARRANTY; without even the implied warranty of |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| GNU General Public License for more details. |
+-------------------------------------------------------------------------+
| Cacti: The Complete RRDTool-based Graphing Solution |
+-------------------------------------------------------------------------+
| This code is designed, written, and maintained by the Cacti Group. See |
| about.php and/or the AUTHORS file for specific developer information. |
+-------------------------------------------------------------------------+
| http://www.cacti.net/ |
+-------------------------------------------------------------------------+
*/
/* make sure these values refect your actual database/host/user/password */
$database_type = "mysql";
$database_default = "cacti";
$database_hostname = "localhost";
$database_username = "cactiuser";
$database_password = "cactiuser";
$database_port = "3306";
$database_ssl = false;
/* Default session name - Session name must contain alpha characters */
#$cacti_session_name = "Cacti";
?>
Thanks for the help, but I am not seeing it.
Re: Change Cacti URL
check at cacti/include/global.php (instead of config.php)
look for this:
/* define default url path */
$url_path = "/cacti/";
set there:
/* define default url path */
$url_path = "/";
If it still does not exist in global.php, you may include it
look for this:
/* define default url path */
$url_path = "/cacti/";
set there:
/* define default url path */
$url_path = "/";
If it still does not exist in global.php, you may include it
Re: Change Cacti URL
It was not in there, I added it and still nothing on the / site.
I also added it to the
global_form.php
global_constants.php
global_settings.php
all nothing.
I also added it to the
global_form.php
global_constants.php
global_settings.php
all nothing.
Re: Change Cacti URL
In such case it seems there is an issue where your apache is pointing or where your cacti base is. Please get the following info for me:
login to mysql command line and run:
use cacti;
select * from settings where name='path_webroot';
what is the output?
then
edit the apache config files and let me know where the "directory root" is pointing to?
vi /etc/http/conf/httpd.conf (the path depends on your apache install)
login to mysql command line and run:
use cacti;
select * from settings where name='path_webroot';
what is the output?
then
edit the apache config files and let me know where the "directory root" is pointing to?
vi /etc/http/conf/httpd.conf (the path depends on your apache install)
Re: Change Cacti URL
This is the results from the mysql output:
mysql> select * from settings were name ='path_webroot';
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'name ='path_webroot'' at line 1
I opened the httpd.conf and it is blank. I am running webmin recently and I am wondering if this is causing the trouble. I found this in the code for the webmin maybe this will explain:
link_dir=/etc/apache2/sites-enabled
test_manual=0
show_list=0
mime_types=/etc/apache2/mime.types
access_conf=/etc/apache2/access.conf
auto_mods=1
stop_cmd=/etc/init.d/apache2 stop
virt_file=/etc/apache2/sites-available
test_apachectl=1
max_servers=100
srm_conf=/etc/apache2/srm.conf
httpd_dir=/etc/apache2
start_cmd=/etc/init.d/apache2 start
show_order=0
test_always=0
httpd_conf=/etc/apache2/apache2.conf
defines_file=/etc/apache2/envvars
apachectl_path=/usr/sbin/apache2ctl
show_names=0
test_config=1
apply_cmd=/usr/sbin/apache2ctl graceful
httpd_path=/usr/sbin/apache2
I also went into the /var/www folder and made a simple index.html file and checked and it ran as normal if you navigate to just the IP
mysql> select * from settings were name ='path_webroot';
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'name ='path_webroot'' at line 1
I opened the httpd.conf and it is blank. I am running webmin recently and I am wondering if this is causing the trouble. I found this in the code for the webmin maybe this will explain:
link_dir=/etc/apache2/sites-enabled
test_manual=0
show_list=0
mime_types=/etc/apache2/mime.types
access_conf=/etc/apache2/access.conf
auto_mods=1
stop_cmd=/etc/init.d/apache2 stop
virt_file=/etc/apache2/sites-available
test_apachectl=1
max_servers=100
srm_conf=/etc/apache2/srm.conf
httpd_dir=/etc/apache2
start_cmd=/etc/init.d/apache2 start
show_order=0
test_always=0
httpd_conf=/etc/apache2/apache2.conf
defines_file=/etc/apache2/envvars
apachectl_path=/usr/sbin/apache2ctl
show_names=0
test_config=1
apply_cmd=/usr/sbin/apache2ctl graceful
httpd_path=/usr/sbin/apache2
I also went into the /var/www folder and made a simple index.html file and checked and it ran as normal if you navigate to just the IP
Re: Change Cacti URL
You received an SQL syntax error due to you mistyped the command. Please note it is "wHere" not "were". Run it again correctly to see the output.
as per your webmin config, the apache configuration file is stored here:
httpd_conf=/etc/apache2/apache2.conf
so you should edit that file, confirm whitin there that the root directoy is pointing to /var/www and change it to /usr/share/xxx/cacti/ (wherever you cacti root directory is in your file system)
restart apache for changes to be applied
as per your webmin config, the apache configuration file is stored here:
httpd_conf=/etc/apache2/apache2.conf
so you should edit that file, confirm whitin there that the root directoy is pointing to /var/www and change it to /usr/share/xxx/cacti/ (wherever you cacti root directory is in your file system)
restart apache for changes to be applied
-
- Cacti Pro User
- Posts: 613
- Joined: Tue Aug 29, 2006 4:09 pm
- Location: NL
Re: Change Cacti URL
Obviously you are running Debian or a derivative. Which version of it and which version of cacti?pamiller3 wrote:I found the config.php file /usr/share/cacti/site/include and in the config file there is no $url_path.
I agree with mmerelles that you should probably fix this in apache.
Maintainer of cacti in Debian (and Ubuntu).
Cacti 1.* is now officially supported on Debian Stretch via Debian backports
FAQ Ubuntu and Debian differences
Generic cacti debugging
Cacti 1.* is now officially supported on Debian Stretch via Debian backports
FAQ Ubuntu and Debian differences
Generic cacti debugging
Re: Change Cacti URL
Change:
Then change apache to show the root directory as home directory.
Done!
in include/config.php$url_path = "/";
Then change apache to show the root directory as home directory.
Done!
cacti rulez!
Who is online
Users browsing this forum: No registered users and 1 guest