How can I change the apache landing page so the user does not have to add /cacti at the end of the URL to launch Cacti in RHEL?
Currently, user has to type https://server-name/cacti
I would like this to be: https://server-name
In /etc/httpd/conf/cacti.conf, I have the alias /cacti pointing to /usr/share/cacti
How do I change this to be the document root? The current DocumentRoot in /etc/httpd/conf/httpd.conf points to "DocumentRoot "/var/www/html""
Change apache landing page to directly launch Cacti
Moderators: Developers, Moderators
Re: Change apache landing page to directly launch Cacti
I just figured this out. For the benefit of others, I changed the DocumentRoot in /etc/httpd/conf/httpd.conf to /usr/share/cacti and this worked.
Re: Change apache landing page to directly launch Cacti
You also need to update config.php so that it has the correct base uri.
Cacti Developer & Release Manager
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
- camerabob
- Cacti User
- Posts: 386
- Joined: Fri Feb 10, 2017 2:45 pm
- Location: Long Island, New York, USA
- Contact:
Re: Change apache landing page to directly launch Cacti
You could alternately just create an index.html file in the current root that will automatically redirect the browser to cacti:
<html lang=en>
<head>
<TITLE>New page location</TITLE>
<META HTTP-EQUIV="Refresh" CONTENT="0; URL=http://<base URL location>/cacti">
</head>
</html>
<html lang=en>
<head>
<TITLE>New page location</TITLE>
<META HTTP-EQUIV="Refresh" CONTENT="0; URL=http://<base URL location>/cacti">
</head>
</html>
Prod: Cacti 1.2.15 @ CentOS Linux release 7.9.2009 (Core) & PHP 5.4.16-48.el7
Maint @ 1.2
Monitor @ 2.3.6
Thold @ 1.2.4
Temp: Cacti 1.2.3 @ CentOS Linux release 7.9.2009 (Core) & PHP 5.4.16-48.el7
Flowview @ 2.1
Mactrack @ 4.2
Maint @ 1.2
Monitor @ 2.3.6
Router Configs @ 1.3.4
Syslog Monitoring @ 2.1
Thold @ 1.2.4
Maint @ 1.2
Monitor @ 2.3.6
Thold @ 1.2.4
Temp: Cacti 1.2.3 @ CentOS Linux release 7.9.2009 (Core) & PHP 5.4.16-48.el7
Flowview @ 2.1
Mactrack @ 4.2
Maint @ 1.2
Monitor @ 2.3.6
Router Configs @ 1.3.4
Syslog Monitoring @ 2.1
Thold @ 1.2.4
Re: Change apache landing page to directly launch Cacti
Hello!
i faced the same problem trying to change
/etc/apache2/sites-available/000-default.conf -> DocumentRoot /var/www/html on DocumentRoot /opt/cacti
/etc/apache2/sites-available/cacti.conf
Alias /cacti /opt/cacti
<Directory /opt/cacti>
Options +FollowSymLinks
AllowOverride None
<IfVersion >= 2.3>
Require all granted
</IfVersion>
<IfVersion < 2.3>
Order Allow,Deny
Allow from all
</IfVersion>
AddType application/x-httpd-php .php
<IfModule mod_php.c>
php_flag magic_quotes_gpc Off
php_flag short_open_tag On
php_flag register_globals Off
php_flag register_argc_argv On
php_flag track_vars On
php_value mbstring.func_overload 0
php_value include_path .
</IfModule>
DirectoryIndex index.php
</Directory>
I would like the cacti would available via direct link https://server-name , without an additional Alias and I can't authenticate to the cacti
i faced the same problem trying to change
/etc/apache2/sites-available/000-default.conf -> DocumentRoot /var/www/html on DocumentRoot /opt/cacti
/etc/apache2/sites-available/cacti.conf
Alias /cacti /opt/cacti
<Directory /opt/cacti>
Options +FollowSymLinks
AllowOverride None
<IfVersion >= 2.3>
Require all granted
</IfVersion>
<IfVersion < 2.3>
Order Allow,Deny
Allow from all
</IfVersion>
AddType application/x-httpd-php .php
<IfModule mod_php.c>
php_flag magic_quotes_gpc Off
php_flag short_open_tag On
php_flag register_globals Off
php_flag register_argc_argv On
php_flag track_vars On
php_value mbstring.func_overload 0
php_value include_path .
</IfModule>
DirectoryIndex index.php
</Directory>
I would like the cacti would available via direct link https://server-name , without an additional Alias and I can't authenticate to the cacti
Re: Change apache landing page to directly launch Cacti
<cacti instalation>/include/config.php:Ruslan777 wrote: ↑Tue Nov 09, 2021 12:08 am Hello!
i faced the same problem trying to change
/etc/apache2/sites-available/000-default.conf -> DocumentRoot /var/www/html on DocumentRoot /opt/cacti
/etc/apache2/sites-available/cacti.conf
Alias /cacti /opt/cacti
<Directory /opt/cacti>
Options +FollowSymLinks
AllowOverride None
<IfVersion >= 2.3>
Require all granted
</IfVersion>
<IfVersion < 2.3>
Order Allow,Deny
Allow from all
</IfVersion>
AddType application/x-httpd-php .php
<IfModule mod_php.c>
php_flag magic_quotes_gpc Off
php_flag short_open_tag On
php_flag register_globals Off
php_flag register_argc_argv On
php_flag track_vars On
php_value mbstring.func_overload 0
php_value include_path .
</IfModule>
DirectoryIndex index.php
</Directory>
I would like the cacti would available via direct link https://server-name , without an additional Alias and I can't authenticate to the cacti
/*
* Set the $url_path to point to the default URL of your cacti install.
* For exmaple if your cacti install as at `https://serverip/cacti/` this
* would be set to `/cacti/`.
*/
$url_path = '/';
Let the Cacti grow!
Re: Change apache landing page to directly launch Cacti
Thanks a lot @macan for your help!
It worked!
<cacti instalation>/include/config.php:
/*
* Set the $url_path to point to the default URL of your cacti install.
* For exmaple if your cacti install as at `https://serverip/cacti/` this
* would be set to `/cacti/`.
*/
$url_path = '/';
It worked!
<cacti instalation>/include/config.php:
/*
* Set the $url_path to point to the default URL of your cacti install.
* For exmaple if your cacti install as at `https://serverip/cacti/` this
* would be set to `/cacti/`.
*/
$url_path = '/';
Who is online
Users browsing this forum: No registered users and 2 guests