Should I use httpd.conf or apache2.conf for Apache configuration?
Solution 1
Just did some more research on this (beyond my comment):
Ubuntu Docs: HTTPD - Apache2 Web Server
apache2.conf: the main Apache2 configuration file. Contains settings that are global to Apache2.httpd.conf: historically the main Apache2 configuration file, named after the httpd daemon. The file can be used for user specific configuration options that globally effect Apache2.
So to echo @slhck - I would source the httpd.conf
from the apache2.conf
.
Solution 2
httpd.conf
is empty (or nonexistent) in some distributions. If an apache2.conf
is present you should probably not edit this, but include your own httpd.conf
from the apache2.conf
. This is because apache2.conf
may be overwritten by package updates.
Your apache2.conf
therefore should include this line. If it doesn't already, you can add it yourself:
Include httpd.conf
/etc/apache2/conf.d
is also a good place to put configuration files.
Related videos on Youtube
tjons
Updated on September 18, 2022Comments
-
tjons over 1 year
On Ubuntu, I am trying to get the
httpd.conf
file for apache2. My server does not show one.Would
apache2.conf
be the same ashttpd.conf
? -
cjsimon over 4 years
-
Admin almost 2 yearsThis does not provide an answer to the question. Once you have sufficient reputation you will be able to comment on any post; instead, provide answers that don't require clarification from the asker. - From Review