Web Servers General Talk - Help please! I can't get server side includes to configure in httpd.conf

This is Interesting: Free IT Magazines  
Home > Archive > Web Servers General Talk > January 2004 > Help please! I can't get server side includes to configure in httpd.conf





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Help please! I can't get server side includes to configure in httpd.conf
Frank Conte

2004-01-19, 6:32 am

Hello everyone

I can't seem to get Apache to run server side includes.

I've made the appropriate changes in httpd.conf
namely

Options +Include

I've made sure that I took Options NoExec out of the configuration file.

I created a mock html file and nothing showed up i the browser, simple
stuff like the date and time and a simple "ls" command.

What gives? Do I have to go ahead and configure SHTML files?

I'm running Yellow Dog linux on an old G3 (very nice by the way!)

Sorry for the cross post..

Frank


Andreas Paasch

2004-01-19, 6:32 am

Frank Conte wrote:
quote:

> Hello everyone
>
> I can't seem to get Apache to run server side includes.
>
> I've made the appropriate changes in httpd.conf
> namely
>
> Options +Include
>
> I've made sure that I took Options NoExec out of the configuration file.
>
> I created a mock html file and nothing showed up i the browser, simple
> stuff like the date and time and a simple "ls" command.
>
> What gives? Do I have to go ahead and configure SHTML files?
>
> I'm running Yellow Dog linux on an old G3 (very nice by the way!)
>
> Sorry for the cross post..
>
> Frank



First of all, it should read Options +Includes
Secondly, is your AddHandler server-parsed .shtml present ?

If not, then that's where to look.

/Andreas

--
Registeret Linux user #292411
Jeffrey Silverman

2004-01-19, 6:32 am

On Sat, 06 Dec 2003 01:25:29 -0500, Frank Conte wrote:
quote:

> Hello everyone
>
> I can't seem to get Apache to run server side includes.
>
> I've made the appropriate changes in httpd.conf
> namely
>
> Options +Include
>
> I've made sure that I took Options NoExec out of the configuration file.
>
> I created a mock html file and nothing showed up i the browser, simple
> stuff like the date and time and a simple "ls" command.
>
> What gives? Do I have to go ahead and configure SHTML files?
>
> I'm running Yellow Dog linux on an old G3 (very nice by the way!)
>
> Sorry for the cross post..
>
> Frank



This is only a suggestion, and does not really help you with your problem
directly.

Instead of the older, inferior, less-featureful, more cumbersome SSI, why
not install a full HTML pre processing system like php (or JSP or
ColdFusion or whatever)? having access to httpd.conf implies access to
the server OS as a whole (and thus you can install and configure
software).

PHP, for example, is a superset of what SSI can do, but in can do scads
more.

like I said, just a suggestion.
--
Jeffrey | Silverman
jeffrey-AT-jhu-DOT-edu |
Johns Hopkins university | Baltimore, MD

(Spam Prevention: replace -AT- and -DOT- with @ and . respectively)

David Efflandt

2004-01-19, 6:32 am

On Sat, 06 Dec 2003 01:25:29 -0500, Frank Conte <fconte@rcn.com> wrote:
quote:

> I can't seem to get Apache to run server side includes.
>
> I've made the appropriate changes in httpd.conf
> namely
>
> Options +Include
>
> I've made sure that I took Options NoExec out of the configuration file.
>
> I created a mock html file and nothing showed up i the browser, simple
> stuff like the date and time and a simple "ls" command.



What file extension for the html file [and what file extension(s) do you
have defined for your AddHandler server-parsed]? What is the format of
your SSI tags? If you call a script with #include virtual= or #exec cgi=
it has to output proper Content-type header. #exec cmd= does not need
headers, but is best avoided due to some cases where that is not trusted
and may not work (since it could potentially run any command outside of
webspace).
quote:

> What gives? Do I have to go ahead and configure SHTML files?



It is customary to have:
AddType text/html .shtml
AddHandler server-parsed .shtml

The AddHandler can have a space separated list of file extensions, but it
is NOT a good idea to parse all .html files. Another option is to use
XBitHack directive to parse specific .html files that have execute bit
set.

If "view source" in your browser shows your SSI tag, then SSI is NOT
working. If SSI was working, you would either see the result of your SSI
tag, or an error.
quote:

> I'm running Yellow Dog linux on an old G3 (very nice by the way!)
>
> Sorry for the cross post..
>
> Frank



--
David Efflandt - All spam ignored http://www.de-srv.com/
Andreas Paasch

2004-01-19, 6:32 am

Frank Conte wrote:
[QUOTE][color=darkred]
> David Efflandt wrote:
>
>
> David
>
> Thanks for writing. I've included AddHandler and XBitHack, pretty much
> the syntax you've outlined above and still no dice. I'm getting tripped
> up httpd.conf obviously. Vetting 1000 lines of "rem" able directives
> seems to be confusing me. Can I just create a .htaccess file for a
> particular directory (I'm now sure if it should be /var/www/html or
> /etc/httpd/conf) I think that's where I'm at.
>
> Since I come to this from Microsoft's Front Page I guess SSIs are
> similar to "web-bots" . In FP, web bots pull server side information
> like the time and display them within the html document you have called.
> I'm not sure of the role that .shtml plays in all this.
>
> If I have a file with SSI calls in it like test.html does the server
> create a test.shtml file and serve that to to the client browser.
>
> Sorry to sound confusing ...
>
> thanx
>
> Frank
>

NO, the server will not create the shtml-page for you, you have to add the
extension to the page.
The server will then - if correctly configured - parse the page then show
the result to the visitor.

You could say that SSI works similar to FP webbots, but SSI is just way
smarter to use.

/Andreas

--
Registeret Linux user #292411
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com