My httpd.conf is empty
It's empty by default. You'll find a bunch of settings in /etc/apache2/apache2.conf
.
In there it does this:
# Include all the user configurations:
Include httpd.conf
It seems to me, that it is by design that this file is empty.
A similar question has been asked here: https://stackoverflow.com/questions/2567432/ubuntu-apache-httpd-conf-or-apache2-conf
So, you should have a look for /etc/apache2/apache2.conf
The /etc/apache2/httpd.conf
is empty in Ubuntu, because the Apache configuration resides in /etc/apache2/apache2.conf
!
“httpd.conf is for user options.” No it isn't, it's there for historic reasons.
Using Apache server, all user options should go into a new *.conf
-file inside /etc/apache2/conf.d/
. This method should be "update-safe", as httpd.conf
or apache2.conf
may get overwritten on the next server update.
Inside /etc/apache2/apache2.conf
, you will find the following line, which includes those files:
# Include generic snippets of statements
Include conf.d/
As of Apache 2.4+ the user configuration directory is /etc/apache2/conf-available/
. Use a2enconf FILENAME_WITHOUT_SUFFIX
to enable the new configuration file or manually create a symlink in /etc/apache2/conf-enabled/
. Be aware that as of Apache 2.4 the configuration files must have the suffix .conf
(e.g. conf-available/my-settings.conf
);
OK - what you're missing is that its designed to be more industrial and serve many sites, so the config you want is probably:
/etc/apache2/sites-available/default
which on my system is linked to from /etc/apache2/sites-enabled/
if you want to have different sites with different options, copy the file and then change those...