On 09/04/2017 16:18, Paul Stimpson wrote:
I've just done a long-overdue refresh on my VPS. One of the packages upgraded was Apache, to version 2.4-25. It appears the syntax of the site conf files has changed since the last version I was running and all is not totally "well on the farm."

I'm not an Apache wizard, but I found the following two URLs helped me with changing my configuration for 2.4:
https://httpd.apache.org/docs/trunk/upgrading.html
https://www.digitalocean.com/community/tutorials/migrating-your-apache-configuration-from-2-2-to-2-4-syntax

The main points I had to deal with were renaming my configuration files to end in ".conf", and replacing: "Order allow,deny
Allow from all" with "Require all granted" (or, for the opposite, "Require all denied").

I have two IP addresses bound to the server.

I am trying to achieve:
This should be the same as for 2.2.
My 'ports.conf' has the following entries:
Listen 80

<IfModule mod_ssl.c>
        Listen 443 https
</IfModule>

<IfModule mod_gnutls.c>
        Listen 443 https
</IfModule>

I think I had to add the 'https' to each line that had '443' to make it work.

For each virtual host you will probably want the entry to start: <VirtualHost *:80> or <VirtualHost *:443> to match any IP address (you'll need a block for each to make it work for both, unless someone can suggest a clever way to do it all in one virtualhost entry).

As long as your VirtualHost has a statement giving the ServerName (and, for any alternate names, ServerAlias), this should work.

(As a side note, if you are using Certbot for your SSL certificates you will only want one VirtualHost entry per conf file or it will not recognise that site).

This should be the same as for 2.2.

Again, I don't think the syntax for this has changed in 2.4, unless you were doing something clever (perhaps with macros?).

I hope that is of some help to you.  You might need to provide a (suitably anonymised) copy of your virtualhost setup so that we can advise further.

Thanks

Gavin