Enabling Server Side Includes (Ssi) in Ubuntu 16.04 Is Not Working
I Have an Html Page with Ssi and I Was Trying for Enabling Ssi in My Apache (V 2.4.18) Running on Ubuntu 16.04. as per the Offical Documentation, I Tried...
I have an html page with SSI and I was trying for enabling SSI in my apache (V 2.4.18) running on Ubuntu 16.04. As per the offical documentation, I tried editing /etc/apache2/apache2.conf and now included following directives,
<Directory /var/www/>
Options FollowSymLinks
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
AllowOverride None
Require all granted
</Directory>
But it was not successful. Also, I tried the direction from here, here and a few similar posts. Unfortunately, it was also failed to enable SSI. Anyone can direct me to solve this issue?
Note: First, I posted it in Server fault (post), but couldn't get a response and I decided to AskUbuntu.
1 Answer
This is how i did it using server side includes
Include your html page inside body:
<!--#include virtual="mypage.shtml"-->Enable the Include and Include.load module
sudo a2enmod include sudo a2enmod include.loadEdit:
/etc/apache2/sites-available/000-default.confPaste below lines inside VirtualHost Tag:
AddOutputFilter INCLUDES .phpEdit your
.htaccess: Paste below line:Options +IncludesRestart your apache by typing:
sudo service apache2 restart
Note:
I am using php with ubuntu