 |
 |
Cannot get SSI working with index.shtml
|
 |
|
 |
|
Forum Regular
Join Date: Jan 2001
Location: Sacramento, CA, USA USA USA
Status:
Offline
|
|
Ive gone through the o-reilly page of how to set up SSI for cgi scripts. I can get my test-cgi script to run, but cannot get it to run as an included file in my index.shtml. i can get my index.php working, though.
heres my code:
Code:
html body
h1 Gleefully crap /h1
pre
!--#include file="news.txt" --
!--#include virtual="/cgi-bin/test-cgi" --
/pre
/body /html
edit:had to remove the greater tahn/less than signs in the code
all that comes up for me is the "gleefully crap"
the page is www.daveninja.com/index.shtml
the test-cgi will run if you goto www.daveninja.com/cgi-bin/test-cgi
Ive done the changes to the httpd.conf file and restarted the apache server.
copy of the httpd.conf file is at www.daveninja.com/httpd_conf.txt
please help
-daveninja
|
|
daveninja.com
|
| |
|
|
|
 |
|
 |
|
Forum Regular
Join Date: Oct 2002
Status:
Offline
|
|
The first thing you should do is look at the spit out source code: It is still showing your SSI tags in the browser, meaning the server did not parse it. If you'd made a mistake it will print out something like [an error occured processing this directive], but your page is just spitting out the page unprocessed.
If that's a copy of your conf file, you don't have 'includes' in the directory definitions.
You have:
Options Indexes FollowSymLinks MultiViews
You want
Options Indexes Includes FollowSymLinks MultiViews
|
|
|
| |
|
|
|
 |
|
 |
|
Forum Regular
Join Date: Jan 2001
Location: Sacramento, CA, USA USA USA
Status:
Offline
|
|
Thanks, that fixed it.
is there a way i can add html files in a different directory to use the SSI and not have to rename them shtml or allow all my html files to be looked at as having SSIs?
|
|
daveninja.com
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Dec 2001
Location: Atlanta, GA, USA
Status:
Offline
|
|
Originally posted by DaveNinja:
Thanks, that fixed it.
is there a way i can add html files in a different directory to use the SSI and not have to rename them shtml or allow all my html files to be looked at as having SSIs?
Easy enough. Look for this in your httpd.conf:
Code:
AddHandler server-parsed .shtml
Add a second, similar line, but with .html:
Code:
AddHandler server-parsed .shtml
AddHandler server-parsed .html
Do this with caution however -- remember that you incur a performance hit when you add server-side parsing. If you're going to serve static HTML pages as well, it may be worth it to keep their extensions separate.
|
|
Mac Pro 2x 2.66 GHz Dual core, Apple TV 160GB, two Windows XP PCs
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |