-1

I am trying to enable SSI to use it in my site. The first thing that i am want to do is just enable it and do an echo to verified if it work at all.

I have apache2, in the root directory there is SSI folder and inside that folder i made a .htaccess file that look like this:

Options +Includes
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml

So now its supposed to enable SSI. (right?)

in the SSI folder there is echo_ssi.shtml file, contain:

<!--#echo var="DATE_GMT" -->

when i am open echo_ssi.shtml in the browser, nothing happen. I suppose to get time and date in GMT...

What im doing wrong in the SSI enable configuration? There is somthing else that im need to do / add?

lolo
  • 17,392
  • 9
  • 25
  • 49

2 Answers2

0

Have you scanned the Apache Module mod_include and the Apache SSI Tutorial documentation?

You need to ensure that you are loading mod_include.

If you have then with the .htaccess lines that you list then

<HTML><BODY><!--#echo var="DATE_LOCAL" --></BODY></HTML>

should return a page with the date & time on it.

TerryE
  • 10,724
  • 5
  • 26
  • 48
  • @lolo Use [LoadModule](http://httpd.apache.org/docs/current/mod/mod_so.html#loadmodule) directive. – ThinkingMonkey Feb 16 '12 at 11:29
  • If your LAMP stack is Debian/Ubuntu, check that you have the symlink for mod_include in `/etc/apache2/sites_enabled`. Or just look at a phpinfo() report. There should be a section **apache2handler** which will list off the modules loaded. If this doesn't exist then you are probably running on a shared service and you need to talk to your service provider – TerryE Feb 16 '12 at 11:38
0

There was a problem with the server cash. need to clean the cash on the server.

lolo
  • 17,392
  • 9
  • 25
  • 49