Due to the CMS framework we are using (OpenCart), we had to go with server side includes (SSI) to load text content on our webpages (which are dynamic PHP). No doubt php_include would be ideal, however the page templates does not allow php for security reasons. At any rate, we are able to get SSI to work on .html pages, but not on .php. The Apache configuration files and loaded modules are listed below. Any suggestions would be greatly appreciated!
Example code for the SSI on an .html page
.htaccess (public_html)
/etc/httpd/conf/httpd.conf
Loaded Modules
Example code for the SSI on an .html page
<!--#include virtual="/includes/content_123.html" -->
.htaccess (public_html)
Options +Includes
AddOutputFilter INCLUDES .html .php
/etc/httpd/conf/httpd.conf
# Further relax access to the default document root:
<Directory "/var/www/html">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.4/mod/core.html#options
# for more information.
#
Options +Includes
AddOutputFilter INCLUDES .php .html
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride All
XBitHack on
#
# Controls who can get stuff from this server.
#
Require all granted
</Directory>
#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#
<IfModule dir_module>
DirectoryIndex index.html index.php
</IfModule>
<FilesMatch "\.(php|shtml|html)$">
SetHandler application/x-httpd-php
</FilesMatch>
Loaded Modules
core_module (static)
so_module (static)
http_module (static)
mpm_prefork_module (shared)
systemd_module (shared)
cgi_module (shared)
access_compat_module (shared)
actions_module (shared)
alias_module (shared)
auth_basic_module (shared)
auth_digest_module (shared)
authn_core_module (shared)
authn_dbd_module (shared)
authn_dbm_module (shared)
authn_file_module (shared)
authz_core_module (shared)
authz_dbd_module (shared)
authz_groupfile_module (shared)
authz_host_module (shared)
authz_user_module (shared)
autoindex_module (shared)
dav_module (shared)
dav_fs_module (shared)
dav_lock_module (shared)
dbd_module (shared)
deflate_module (shared)
dir_module (shared)
env_module (shared)
expires_module (shared)
file_cache_module (shared)
filter_module (shared)
headers_module (shared)
include_module (shared)
log_config_module (shared)
log_forensic_module (shared)
logio_module (shared)
mime_module (shared)
mime_magic_module (shared)
negotiation_module (shared)
proxy_module (shared)
proxy_fcgi_module (shared)
proxy_http_module (shared)
proxy_wstunnel_module (shared)
remoteip_module (shared)
rewrite_module (shared)
setenvif_module (shared)
slotmem_shm_module (shared)
socache_dbm_module (shared)
socache_shmcb_module (shared)
socache_redis_module (shared)
speling_module (shared)
status_module (shared)
unique_id_module (shared)
unixd_module (shared)
userdir_module (shared)
bwlimited_module (shared)
ssl_module (shared)
security2_module (shared)
ruid2_module (shared)
Last edited by a moderator: