When you install Cacti , it will auto install and configure the Apache webserver for you and you will then be able to access the Web GUI via the Public IP . But there are cases you already have apache installed and other services running . For eg: my server is an AWS EC2 instance , so if I go for auto configure it set the web gui on the eth0 private IP and then I will be able to access the web via the AWS public IP . But I have a VPN connectivity between my servers and have a seperate tun interface and now needs to configure the cacti on that tunnel IP on a seperate port number , so to configure Apache manually in Ubuntu :
vi /etc/apache2/apache2.conf
Configure the Listen directive with IP and your port number .
Listen 10.0.1.1:8000
Then you need to allow privileges to the required cacti files under Directory directives:
<Directory /usr/share/cacti>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
Then configure the Virtual host entry :
<VirtualHost 10.0.1.1:8000>
ServerAdmin xxxx@.xxxxcom
DocumentRoot /usr/share/cacti
ServerName cacti.lan
ErrorLog /var/log/apache2/cacti-error_log
CustomLog /var/log/apache2/cacti-access_log common
</VirtualHost>
Save and exit and restart apache
Leave a Reply