# load the php module if it is not already loaded
<IfModule !php7_module>
  LoadModule php7_module lib/httpd/mod_php7.so
</IfModule>

Alias /cacti "/usr/pkg/share/cacti"

<Directory "/usr/pkg/share/cacti">
  Options None
  AllowOverride Limit
  AddHandler application/x-httpd-php .php
  DirectoryIndex index.php

  # Adjust access
  Require ip 127.0.0.1
  #Require all granted

</Directory>

# some people prefer a simple URL like http://cacti.example.com
#<VirtualHost 1.2.3.4>
#  DocumentRoot /usr/pkg/share/cacti
#  ServerName cacti.example.com
#</VirtualHost>
