Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OSX 10.10 Yosemite apache upgrade to 2.4, server side includes no longer works

I recently upgraded my Mac to OSX 10.10 Yosemite, which reset a bunch of settings I'd made for Apache, including my virtual hosts set up. I've restored all of that, but I'm still unable to get Server-side Includes working, where they worked fine under Mavericks and the previous Apache installation.

Here's an example of an include statement in my .SHTML files:

`<!--#include virtual="/includes/branded-header.html" -->`

Here's the httpd-vhosts.conf entry

`
<VirtualHost *:80>
    ServerName v12b.local
    ServerAlias www.v12b.local
    DocumentRoot "/Users/my-name/Sites/v12b"
    ErrorLog "/private/var/log/apache2/v12b.local-error_log"
    CustomLog "/private/var/log/apache2/v12b.local-access_log" common
    ServerAdmin [email protected]
<Directory "/Users/my-name/Sites/v12b">
    Options Indexes FollowSymLinks Includes
    AllowOverride All
    Order allow,deny
    Allow from all
    Require all granted
    AddType text/html .shtml .html
    AddOutputFilter INCLUDES .shtml .html
    AddType application/x-httpd-php .html
</Directory>    
</VirtualHost>`

I've checked Apache documentation and other guides, so my username.conf and httpd.conf files look to be in order. Any help would be greatly appreciated.

thanks!

like image 439
John Egan Avatar asked Oct 21 '14 19:10

John Egan


1 Answers

I was able to find an answer on an Apache forum, so I thought I'd share it here.

LoadModule include_module libexec/apache2/mod_include.so

I missed removing the comment on this line in my httpd.conf file. Once I removed the comment and restarted Apache, everything started working again.

Looks like 2.4 is a pretty big upgrade from 2.2, with lots of changes. Hopefully, someone else might find this helpful.

like image 117
John Egan Avatar answered Sep 24 '22 05:09

John Egan