Hello,
I'm sorry if this is a basic question and I'm sure it will be a quick fix.. But with Cacti 0.8.8.a & Apache2 how can I make it so when the user goes to either
http://cacti.local.domain or http://cacti
It goes to the Cacti login page. Right now they have to go to http://cacti.local.domain/cacti or http://cacti/cacti
I tried changing the httpd.conf but for some reason I couldn't get it right..
Thanks!
Cacti in root web path
Moderators: Developers, Moderators
Re: Cacti in root web path
For anyone who is looking for the resolution:
Document root needs to be changed in /etc/httpd/conf/httpd.conf to:
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "/var/www/html/cacti"
The document directory needs to remain /var/www/html
In /var/www/html/cacti the url_path needs to be changed in config.php and global.php to /
Restart the httpd service and you should be good to go.
This is for CentOS and should probably apply to most RPM based distros. Of course paths may change depending on your installation.
For Debian based distros I believe httpd is replaced with apache2.
Document root needs to be changed in /etc/httpd/conf/httpd.conf to:
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "/var/www/html/cacti"
The document directory needs to remain /var/www/html
In /var/www/html/cacti the url_path needs to be changed in config.php and global.php to /
Restart the httpd service and you should be good to go.
This is for CentOS and should probably apply to most RPM based distros. Of course paths may change depending on your installation.
For Debian based distros I believe httpd is replaced with apache2.
Re: Cacti in root web path
This is a pretty old thread, but there is so little information on this I figured I would add steps you need to take to remove the issue of having to put /cacti at the end of your URL. This is if you are using Ubuntu/Apache2, also this is only if Cacti is the only site you are using on your web server.
[* Change your vim /etc/apache2/sites-available/000-default.conf document root to = DocumentRoot /usr/share/cacti/site/]
[* Change your $url_path = "/Cacti/"; in /usr/share/cacti/site/includes/config.php and global.php to $url_path = "/";]
Document Root is really just telling the browser where to go for its default page when you go to root of a URL. With Cacti the sites web directory is completely outside of apache and in its own directory structure, hence I changed the document root to /usr/share/cacti/site/
[* Change your vim /etc/apache2/sites-available/000-default.conf document root to = DocumentRoot /usr/share/cacti/site/]
[* Change your $url_path = "/Cacti/"; in /usr/share/cacti/site/includes/config.php and global.php to $url_path = "/";]
Document Root is really just telling the browser where to go for its default page when you go to root of a URL. With Cacti the sites web directory is completely outside of apache and in its own directory structure, hence I changed the document root to /usr/share/cacti/site/
Who is online
Users browsing this forum: No registered users and 5 guests