Where is httpd.conf? Cacti 1.0.4

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
MissouriSpartan
Posts: 34
Joined: Fri Dec 16, 2016 12:52 pm

Where is httpd.conf? Cacti 1.0.4

Post by MissouriSpartan »

I'm trying to install a brand new instance of Cacti 1.0.4 on a fresh Ubuntu Server 16.04 VM. I've been following the directions on the installation guide PDF found in the DOCS folder. However, the problem I'm running into is setting up the Apache Webserver. I've installed Apache2, but there is no httpd.conf file anywhere to configure according to the following part of the guide:
2.4. Configure the Webserver (Apache)
Please find the file /etc/httpd/conf/httpd.conf or equivalent and make the following changes to it:
# Load config files from the config directory "/etc/httpd/conf.d".
Include conf.d/*.conf
Now, please locate the PHP configuration file at /etc/httpd/conf.d/php.conf
# PHP is an HTML-embedded scripting language which attempts to make it
# easy for developers to write dynamically generated webpages.
LoadModule php_module modules/libphp.so
#
# Cause the PHP interpreter to handle files with a .php extension.
AddHandler php-script .php
AddType text/html .php
#
# Add index.php to the list of files that will be served as directory
# indexes.
DirectoryIndex index.php
I've installed PHP 7.0, Apache2, all of the required PHP extensions, and successfully setup the MySQL database. I've also ensured that the php.ini file is configured to enable file uploads and the extensions mentioned in the guide.

Any ideas? :-?

EDIT:

'httpd.conf' doesn't exist anymore according to what I'm finding. When I try to apt-get httpd, it just says that's not a valid package and suggests other web servers like Apache2 instead. Does anyone have any ideas? I'd love to get Cacti 1.0.4 working, but it's still a no-go. Yes, as you can probably tell, I'm a complete n00b with installing this manually. The last Cacti I installed was through apt-get which is NOT 1.0.4, currently, it's 0.8.8h.
smiles
Cacti User
Posts: 79
Joined: Mon Sep 10, 2012 5:54 pm

Re: Where is httpd.conf? Cacti 1.0.4

Post by smiles »

Are you sure it's not in /etc/apache2/apache2.conf?
MissouriSpartan
Posts: 34
Joined: Fri Dec 16, 2016 12:52 pm

Re: Where is httpd.conf? Cacti 1.0.4

Post by MissouriSpartan »

Not those specific lines. I did a Ctrl + W in Nano to search for them, but they weren't there.
smiles
Cacti User
Posts: 79
Joined: Mon Sep 10, 2012 5:54 pm

Re: Where is httpd.conf? Cacti 1.0.4

Post by smiles »

What is the output of:

dpkg -l |grep php

AND

ls -l /etc/apache2/mods-enabled
MissouriSpartan
Posts: 34
Joined: Fri Dec 16, 2016 12:52 pm

Re: Where is httpd.conf? Cacti 1.0.4

Post by MissouriSpartan »

dpkg -l |grep php

Code: Select all

ii  libapache2-mod-php                 1:7.0+35ubuntu6                   all          server-side, HTML-embedded scripting language (Apache 2 module) (default)
ii  libapache2-mod-php7.0              7.0.15-0ubuntu0.16.04.4           amd64        server-side, HTML-embedded scripting language (Apache 2 module)
ii  php                                1:7.0+35ubuntu6                   all          server-side, HTML-embedded scripting language (default)
ii  php-common                         1:35ubuntu6                       all          Common files for PHP packages
ii  php-gd                             1:7.0+35ubuntu6                   all          GD module for PHP [default]
ii  php-gmp                            1:7.0+35ubuntu6                   all          GMP module for PHP [default]
ii  php-ldap                           1:7.0+35ubuntu6                   all          LDAP module for PHP [default]
ii  php-mbstring                       1:7.0+35ubuntu6                   all          MBSTRING module for PHP [default]
ii  php-mcrypt                         1:7.0+35ubuntu6                   all          libmcrypt module for PHP [default]
ii  php-mysql                          1:7.0+35ubuntu6                   all          MySQL module for PHP [default]
ii  php-snmp                           1:7.0+35ubuntu6                   all          SNMP module for PHP [default]
ii  php-xml                            1:7.0+35ubuntu6                   all          DOM, SimpleXML, WDDX, XML, and XSL module for PHP [default]
ii  php7.0                             7.0.15-0ubuntu0.16.04.4           all          server-side, HTML-embedded scripting language (metapackage)
ii  php7.0-cli                         7.0.15-0ubuntu0.16.04.4           amd64        command-line interpreter for the PHP scripting language
ii  php7.0-common                      7.0.15-0ubuntu0.16.04.4           amd64        documentation, examples and common module for PHP
ii  php7.0-gd                          7.0.15-0ubuntu0.16.04.4           amd64        GD module for PHP
ii  php7.0-gmp                         7.0.15-0ubuntu0.16.04.4           amd64        GMP module for PHP
ii  php7.0-json                        7.0.15-0ubuntu0.16.04.4           amd64        JSON module for PHP
ii  php7.0-ldap                        7.0.15-0ubuntu0.16.04.4           amd64        LDAP module for PHP
ii  php7.0-mbstring                    7.0.15-0ubuntu0.16.04.4           amd64        MBSTRING module for PHP
ii  php7.0-mcrypt                      7.0.15-0ubuntu0.16.04.4           amd64        libmcrypt module for PHP
ii  php7.0-mysql                       7.0.15-0ubuntu0.16.04.4           amd64        MySQL module for PHP
ii  php7.0-opcache                     7.0.15-0ubuntu0.16.04.4           amd64        Zend OpCache module for PHP
ii  php7.0-readline                    7.0.15-0ubuntu0.16.04.4           amd64        readline module for PHP
ii  php7.0-snmp                        7.0.15-0ubuntu0.16.04.4           amd64        SNMP module for PHP
ii  php7.0-xml                         7.0.15-0ubuntu0.16.04.4           amd64        DOM, SimpleXML, WDDX, XML, and XSL module for PHP
ls -l /etc/apache2/mods-enabled

Code: Select all

lrwxrwxrwx 1 root root 36 Feb 28 13:45 access_compat.load -> ../mods-available/access_compat.load
lrwxrwxrwx 1 root root 28 Feb 28 13:45 alias.conf -> ../mods-available/alias.conf
lrwxrwxrwx 1 root root 28 Feb 28 13:45 alias.load -> ../mods-available/alias.load
lrwxrwxrwx 1 root root 33 Feb 28 13:45 auth_basic.load -> ../mods-available/auth_basic.load
lrwxrwxrwx 1 root root 33 Feb 28 13:45 authn_core.load -> ../mods-available/authn_core.load
lrwxrwxrwx 1 root root 33 Feb 28 13:45 authn_file.load -> ../mods-available/authn_file.load
lrwxrwxrwx 1 root root 33 Feb 28 13:45 authz_core.load -> ../mods-available/authz_core.load
lrwxrwxrwx 1 root root 33 Feb 28 13:45 authz_host.load -> ../mods-available/authz_host.load
lrwxrwxrwx 1 root root 33 Feb 28 13:45 authz_user.load -> ../mods-available/authz_user.load
lrwxrwxrwx 1 root root 32 Feb 28 13:45 autoindex.conf -> ../mods-available/autoindex.conf
lrwxrwxrwx 1 root root 32 Feb 28 13:45 autoindex.load -> ../mods-available/autoindex.load
lrwxrwxrwx 1 root root 30 Feb 28 13:45 deflate.conf -> ../mods-available/deflate.conf
lrwxrwxrwx 1 root root 30 Feb 28 13:45 deflate.load -> ../mods-available/deflate.load
lrwxrwxrwx 1 root root 26 Feb 28 13:45 dir.conf -> ../mods-available/dir.conf
lrwxrwxrwx 1 root root 26 Feb 28 13:45 dir.load -> ../mods-available/dir.load
lrwxrwxrwx 1 root root 26 Feb 28 13:45 env.load -> ../mods-available/env.load
lrwxrwxrwx 1 root root 29 Feb 28 13:45 filter.load -> ../mods-available/filter.load
lrwxrwxrwx 1 root root 27 Feb 28 13:45 mime.conf -> ../mods-available/mime.conf
lrwxrwxrwx 1 root root 27 Feb 28 13:45 mime.load -> ../mods-available/mime.load
lrwxrwxrwx 1 root root 34 Feb 28 13:46 mpm_prefork.conf -> ../mods-available/mpm_prefork.conf
lrwxrwxrwx 1 root root 34 Feb 28 13:46 mpm_prefork.load -> ../mods-available/mpm_prefork.load
lrwxrwxrwx 1 root root 34 Feb 28 13:45 negotiation.conf -> ../mods-available/negotiation.conf
lrwxrwxrwx 1 root root 34 Feb 28 13:45 negotiation.load -> ../mods-available/negotiation.load
lrwxrwxrwx 1 root root 29 Feb 28 13:46 php7.0.conf -> ../mods-available/php7.0.conf
lrwxrwxrwx 1 root root 29 Feb 28 13:46 php7.0.load -> ../mods-available/php7.0.load
lrwxrwxrwx 1 root root 31 Feb 28 13:45 setenvif.conf -> ../mods-available/setenvif.conf
lrwxrwxrwx 1 root root 31 Feb 28 13:45 setenvif.load -> ../mods-available/setenvif.load
lrwxrwxrwx 1 root root 29 Feb 28 13:45 status.conf -> ../mods-available/status.conf
lrwxrwxrwx 1 root root 29 Feb 28 13:45 status.load -> ../mods-available/status.load

smiles
Cacti User
Posts: 79
Joined: Mon Sep 10, 2012 5:54 pm

Re: Where is httpd.conf? Cacti 1.0.4

Post by smiles »

So if you open a browser and point to your new server, do you get the apache "it's working" or Apache default page?
MissouriSpartan
Posts: 34
Joined: Fri Dec 16, 2016 12:52 pm

Re: Where is httpd.conf? Cacti 1.0.4

Post by MissouriSpartan »

No. I get a bit list of raw php code and a page that talks about what Cacti is designed for. But no login screen.
smiles
Cacti User
Posts: 79
Joined: Mon Sep 10, 2012 5:54 pm

Re: Where is httpd.conf? Cacti 1.0.4

Post by smiles »

Not to the cacti dir, I mean your root document directory where the index.html is placed.

Rename your index.html to index.orig

Create a new file in that same directory called index.php and put the following in there:

<?php phpinfo(); ?>


Then point your browser to the root directory and see if your base php install is working correctly before adding the cacti install to the mix.
smiles
Cacti User
Posts: 79
Joined: Mon Sep 10, 2012 5:54 pm

Re: Where is httpd.conf? Cacti 1.0.4

Post by smiles »

Following an Ubuntu LAMP install HOWTO like:

https://www.unixmen.com/how-to-install- ... ntu-16-04/

Should get your server completely ready for a Cacti install.

You are probably going to want php7.0-cgi and php7.0-curl as well like it states.
MissouriSpartan
Posts: 34
Joined: Fri Dec 16, 2016 12:52 pm

Re: Where is httpd.conf? Cacti 1.0.4

Post by MissouriSpartan »

It's working!!!!!

I set the phpinfo page like you said. It indicated PHP 7 was working. So I rebooted the server, and discovered I was missing a couple of PHP packages.

Now everything's in ship-shape. Thanks for your help!!
smiles
Cacti User
Posts: 79
Joined: Mon Sep 10, 2012 5:54 pm

Re: Where is httpd.conf? Cacti 1.0.4

Post by smiles »

Good deal!
ChristianC123
Posts: 2
Joined: Sat Jun 03, 2017 5:47 pm

Re: Where is httpd.conf? Cacti 1.0.4

Post by ChristianC123 »

Ubuntu doesn't use httpd.conf as standard, instead global configuration stuff for apache is found in /etc/apache2/apache2.conf. You can create a httpd.conf in the apache2 directory, and load any further configuration from it by including the following line in /etc/apache2/apache2.conf.

Code: Select all

Include /etc/apache2/httpd.conf
You don't need that file to configure apache, but you can create it if other software relies on it being there.
ChristianC
System Admn
http://cloudappsportal.com/
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests