Web Hosting Talk







View Full Version : SSI in HTML files


NVB
12-16-2001, 10:58 PM
Is it possible to configure a Linux server with Apache to permit server side includes in .htm files rather than .shtml ? What are the disadvantages of doing this?

GeorgeC
12-16-2001, 11:35 PM
Most definitely. In fact I have my host do this for my pages. The disadvantage would simply be that all .htm pages will be parsed for SSI, whether or not every page contains a SSI call (so increased load).

Dexter
12-16-2001, 11:49 PM
sure nuttin a little .htaccess action can't handle :)

Just drop this into a text file named ".htacess" and place it in your root directory and every ".html" file in the entire domain will be processed for ssi...

~~~~
AddType text/html .html
AddHandler server-parsed .html
Options All
~~~~

NVB
12-17-2001, 02:36 AM
Thanks for the help. I am a bit concerned about parsing each page for SSI. Would this cause the pages to load slower?

The server gets about 200k page views per day on .htm pages. It has a 750MHZ processor, 512 MB RAM, and typical server loads range from 0.0 - 0.6 . Should I be at all concerned about the server load increase from the SSI parsing? What type of load increase should I expect?

GeorgeC
12-17-2001, 07:30 AM
I'm no hardward expert, but from experience the server should definitely be enough if you're just using SSI includes. Throw in stuff like banner rotation or other more cpu intensive cgi scripts, you will have a problem.

NVB
12-17-2001, 01:58 PM
<EDIT>
Message self-deleted, due to trouble with Lynx browser.

MotleyFool
12-18-2001, 07:30 AM
PArsing all files is not at all a good idea.

If you still want .htm files to have SSI, you can atleast keep the plain ones with .html extension

Hope this helps

Cheers
Balaji

daintree
12-18-2001, 09:40 AM
Another solution is to switch 'XBitHack on' and then only .html or .htm files with the execute attribute on will be parsed.

bobcares
12-18-2001, 02:38 PM
Yes daintree's suggestion is correct.
XBitHack is used for a serverwide setup.
All you have to do is ad the following in the httpd.conf file.
XBitHack on

Have a great day :)

regards
amar

daintree
12-18-2001, 07:40 PM
You can also put XBitHack in your .htaccess, virtual host or directory context.