Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

grizfan

macrumors member
Original poster
Feb 10, 2012
86
4
Boise, ID
I just updated my iMac to Yosemite. The upgrade from Apache 2.2 to 2.4 has caused a few issues. I was able to fix most, but I'm still having problems with server-side includes. I'm using the built in Apache, and have setup httpd-vhosts.conf and configured my hosts file set up to allow for multiple dev sites. Pages load, but my .shtml files are not even attempting to process the include virtual statements.

statements like this in my .shtml files are not getting processed:

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

in my vhosts.conf file, each directory has the following:

Code:
<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 my-name@myco.com
<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>

from what I've read, this should be working. I've tried a few different combinations, and I just can't get my includes to fire.

any help would be greatly appreciated.
 
Code:
LoadModule include_module libexec/apache2/mod_include.so


I missed removing the comment on this line in my httpd.conf file.
At least I now know a lot more about configuring Apache.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.