Hey Apache what happened to my httpd.conf ?

Posted by on Aug 18, 2016 in Web & Server

Running Apache 2.4 on Debian Jessie

So there i was casually upgrading a friends server to Apache 2.4 and looking for the httpd.conf file in Debian Jessie when i realised it had been effectively ‘done away with’.

RIP…… HTTPD.CONF

No only that but, because of syntax changes, a lot of older server-wide configurations and directives using mod-rewrite and redirect were effectively not going to work this time around wherever i put them.

The new /etc/apache2 folder looks like this;

etc:apache2

That little apache2.conf file is important because it now sets a framework to form the main configuration and draws in virtual servers available and other directives and instructions according to what you ask it to pull in.

Here’s what it tells you at the head when you open it up;
apach2conf-01

So you now have a hierarchy set out – controlled by apache2.conf which ‘sucks in’ other configurations set by the user such as which virtual hosts to set, server-wide security configurations etc. Heck it’s pretty much set it out in black and white in the file itself;

apach2conf-02

The apache2 file itself takes care of including the virtual host configurations and whatever generic directives or snippets you care to set..

apache includes

Setting up those virtual hosts and instructing Debian to enable modules and enable the sites via symlinks isn’t too hard – even for a numb-nuts like me.

In Part 2 i’ll take a look a working set up and how to get there. Also how my handling of things like canonical names and permanent re-directs changed to accommodate Apache on Debian Jessie.

#