Getting server-side includes to work in OS X's Apache web server
I'm eventually going to replace all of the old SSI stuff I have with PHP, but for now, I'd like to get some .shtml pages which work fine when placed on my web hosting service to work locally in my Apache web serving for testing purposes.
I've done everything I think I need to do with the httpd.conf file, stopped and restarted the web server for each change I've tried, but I still get zip. My .shtml files seem to be being treated just like .html files, with the comments lines which should be executed as includess simply coming along for the ride like static HTML.
(1) mod_include has been activated with these lines:
LoadModule includes_module libexec/httpd/mod_include.so
AddModule mod_include.c
(2) The "Includes" option has been enabled thus:
Options Includes Indexes FollowSymLinks MultiViews ExecCGI
(3) SSI processing has been enabled with these lines:
AddType text/html .shtml
AddHandler server-parsed .shtml
(4) And I've enabled (obviously at least this part is successful) the file "index.shtml" to be found as a default document:
DirectoryIndex index.html index.php index.shtml
I've even made sure the executable bits of my .shtml files are all set on. Still no joy. I've been Googling around a bit for answers, but haven't come up with much. Anyone got any ideas?
I've done everything I think I need to do with the httpd.conf file, stopped and restarted the web server for each change I've tried, but I still get zip. My .shtml files seem to be being treated just like .html files, with the comments lines which should be executed as includess simply coming along for the ride like static HTML.
(1) mod_include has been activated with these lines:
LoadModule includes_module libexec/httpd/mod_include.so
AddModule mod_include.c
(2) The "Includes" option has been enabled thus:
Options Includes Indexes FollowSymLinks MultiViews ExecCGI
(3) SSI processing has been enabled with these lines:
AddType text/html .shtml
AddHandler server-parsed .shtml
(4) And I've enabled (obviously at least this part is successful) the file "index.shtml" to be found as a default document:
DirectoryIndex index.html index.php index.shtml
I've even made sure the executable bits of my .shtml files are all set on. Still no joy. I've been Googling around a bit for answers, but haven't come up with much. Anyone got any ideas?