View Full Version : SSI problem...
SSI was working on my server. However, it stop working these days. All the shtml codes are not showing the results on the page. The server reads the codes just like comments in html file.
Can anyone tell me, what could be the problem? And how to fix it?
Smirks 11-28-2001, 11:48 AM You need to add the following to your httpd.conf file, assuming you're using apache...
AddType text/html .shtml
AddHandler server-parsed .shtml
After you add that restart apache and you should be good to go.
bitserve 11-28-2001, 04:17 PM smirks reply could fix the problem if your documents end with .shtml, another problem might be that you no longer have the Includes Option enabled in your httpd configuration file.
bobcares 11-28-2001, 04:37 PM HI!
I guess this is what you'd have to do to the httpd.conf file..
AddType text/html .shtml
AddHandler server-parsed .shtml
Options Indexes FollowSymLinks Includes
Also if you want .html extension to work just add the following to
httpd.conf
XBitHack On
Please note this does have some security risks...
Have a great day :)
Regards
Amar
The codes are in my httpd.conf . SSI is still not working for .shtml files.
Or do you have any script for me to test out the SSI ?
bobcares 11-29-2001, 06:16 AM Hi!
Try this -
Local Time : <!--#echo var="DATE_LOCAL" --> <p>
GMT Time : <!--#echo var="DATE_GMT" --> <p>
Have a great day :)
Regards
Amar
Ok, tested. SSI isn't working on the box. Is there any more stuff I can do to make it works except for the codes you listed here?
However, I do notice my /usr partition is kind of full and the system is showing me alert, would it possibly be affecting SSI ?
bobcares 11-30-2001, 09:35 AM First remove some files and create some space. Then restart apache and try and see what happens.
Free space is a must for everything.
Keep us posted with what happens.
Have a great day :)
Regards
amar
Well, one good news and two bad news.
Good news is, diskspace issue might be the source for the problems.
Bad news are, I don't know which should I clear up in /usr and my FTP is having some minor problem as well.
Gosh...
bobcares 12-01-2001, 10:40 AM HI!
The rule is clear disk space.
You can easily move some directories to other partitions that are free and the create soft links for it.
It would do no harm ...
On a default BSD box the /home is a system link and the actual /home is the /usr/home/
You'd have to restart the services after that.
/etc/rc.d/rc 3
Have a great day :-)
Regards
amar
Space is now free from /usr . But no sign of SSI and FTP fixing up by themselves.
bobcares 12-01-2001, 01:44 PM Hi!
Try rebooting the server.
It should work.
Keep us updated on this...
Have a great day :)
Regards
amar
Rebooted, and still not working. Argh~~~
bobcares 12-03-2001, 10:48 AM I'm sorry I wasn't here. I'm supposed to be preparing for a seminar that I'm supposed to take..... :(
I hope you have managed to run SSI now.
If no , please recheck your httpd.conf and confirm the the following line is there.
Options Includes
Many a times this a major problem.
Have a great day :)
regards
amar
cactus 12-03-2001, 01:34 PM If you want to enable SSI in the entire (primary) web site add the following directive in the global config files(such as access.conf(old ver), srm.conf(old ver), httpd.conf(new 3 in 1) the following:
Options +Includes
If you want to enable SSI support for a virtual website, you need to put the directive inside the container e. g.
<VirualHost IP ....... >
<Directory /some/path>
AddType text/html .shtml
AddHandler server-parsed .shtml
Options +Includes
</Directory>
</VirtualHost>
Saved the file and restart Apache and call the page.shtml again to test if it parse correctly
It's similar for enabling CGI, the <Directory> Options + ExecCGI</Directory>
Also check your mod_include.c module required for SSI support which is complied by default in standard Apache executable, the SSI parsing of HTML pages is not enable by default. Since you mentioned that it was working earlier, I would suggest checking the http.conf carefully again.
Hope this helps
I checked mod_include and found out that it was not added to my httpd.conf (most probably because I updated to a newer version of Apache a while ago), I add it in AddModule , and it works. However, do I need to add it in LoadModule as well?
If so, what's the codes to add there?
By the way, is there any code I can add to enable SSI for all the accounts?
(SH)Saeed 12-04-2001, 05:02 AM I don't think you need LoadModule if you have mod_include compiled in your Apache.
The load module line is:
LoadModule include_module libexec/mod_include.so
Your module might be located elsewhere than in the libexec directory located in the Apache root directory. If so, change the path to it.
If you load this module, if you've unchecked the .shtml lines and have Inlcudes in your users <Directory> tag Options, then it should most likely work for all your users sites.
A little description on AddModule from Apache.org
The server can have modules compiled in which are not actively in use. This directive can be used to enable the use of those modules. The server comes with a pre-loaded list of active modules; this list can be cleared with the ClearModuleList directive.
How abt the codes to enable SSI for all accounts ?
cactus 12-04-2001, 08:03 AM Hi,
GROUP:
To enable SSI for all users, you have to add the
Options +Includes in your access.conf(if you have one) or httpd.conf
USER:
For individual virtual clients add the above for the particular client/domain in their
<VirtualHost IP...>
ServerName www.client1.com
DocumentRoot /www/client1
<Directory>
Options +Includes
</Directory>
</VirtualHost>
Restart apache/server and it should work in global mode and for all directories. If Options +Includes is missing in your access.conf or httpd.conf file then it will only work for a particular client if you enable it in their <Virtual....> of your httpd.conf file.
Hope this helps
Options All included the +Includes right?
cactus 12-04-2001, 01:12 PM Yes
cactus 12-04-2001, 01:18 PM Please try. Usually it's Options +Includes in httpd.conf for all(group)
and (user) directive inside container/tag<VirtualHost...><Directory> Option +Includes
|