Apache 2.4 Upgrade Notes
In December 2020 we began the process of upgrading the primary department webserver, www.cs.jhu.edu, from Apache 2.2 to Apache 2.4. This includes some incompatible changes; please read through this page to see if you need to adjust your website or personal web pages that we host.
In general, these changes should only matter if you use a
.htaccess file anywhere within your webspace. You can find out if you have one by running the following command on one of our Linux clients: find ~/public_html -name .htaccess
Everyone will have at least
~/public_html/.htaccess; if that's your only file and the only thing in that file is an
FcgidWrapper directive, you don't need to worry about anything on this page. Otherwise, please continue reading.
In cases where the syntax for something has changed, you will need to have both syntaxes present in order for things to work on both our old and new server. This will be required until the old server is fully retired, which we expect to happen in late January 2021.
To accomplish this, you will need to use Apache's IfVersion directive, roughly like this:
<IfVersion < 2.4> # Apache 2.2-specific things, e.g.: # Order ... # Allow ... </IfVersion> <IfVersion >= 2.4> # Apache 2.4 things, e.g.: # Require ... </IfVersion>
The Apache authorization directives have changed significantly. Instead of a combination of
Deny directives, you now need to use a singular
Require directive. The Apache upgrading page goes into more detail, but some common cases are as follows:
<IfVersion < 2.4> Order allow,deny Allow from all </IfVersion> <IfVersion >= 2.4> Require all granted </IfVersion>
Allow only from a particular subnet:
<IfVersion < 2.4> Order deny,allow Allow from 220.127.116.11/24 </IfVersion> <IfVersion >= 2.4> Require ip 18.104.22.168/24 </IfVersion>
The instructions from our Using Shibboleth page should be almost all of what you need. The only change you need to make is to put the
ShibCompatWith24 directive inside an
<IfVersion < 2.4> ShibCompatWith24 On </IfVersion>