SSI & Apache Help. Webmaster is clueless!

SSI & Apache Help. Webmaster is clueless!

Post by Phylaxi » Tue, 16 Apr 1996 04:00:00



Hi,
I need some help with getting Server Side Includes to work on the server
at my ISP, but my Webmaster doesn't seem to know too much about the
Apache Server software they are running. Therefore I will take it upon
myself to learn it. If anyone here could help that would be great.
Here's the situation:
My ISP webmaster has (so he says?) activated SSI's for my account.
I have add the command <!--#flastmod name="welcome.shtml" --> to my
HTML.
I have saved the file as welcome.shtml
now when I try to call the file Netscape sees it as an x-server-parsed
file and not conventional html. So netscape just saves the file as a
text file as per the setup for my helper apps.

My assuption is that the file is not being parsed by the server. What I
don't know is why? Any suggestions? Keep in mind I beleieve that my ISP
webmaster has probably not configured the Apache software correctly.

Thanks for any suggestions.
--

 oo       |  This e-mail has been sanitzed for your protection. |
 \/ -Moo! |  I'm on the web at http://www.europa.com/~phylaxis  |

 
 
 

SSI & Apache Help. Webmaster is clueless!

Post by Rob Hartil » Wed, 17 Apr 1996 04:00:00



> My ISP webmaster has (so he says?) activated SSI's for my account.
> I have add the command <!--#flastmod name="welcome.shtml" --> to my
> HTML.
> I have saved the file as welcome.shtml
> now when I try to call the file Netscape sees it as an x-server-parsed
> file and not conventional html.

This means that Includes are not allowed in the directory containing
your .shtml file.

You can try adding

Options Includes

to a .htaccess file in that directory, but there's a chance that your
provider has disabled this.. Give it a try anyway,

--
http://nqcd.lanl.gov/~hartill/
     ------- where do you want to be mislead today? --------

 
 
 

SSI & Apache Help. Webmaster is clueless!

Post by Steven Champe » Sun, 28 Apr 1996 04:00:00



> Here's the situation:
> My ISP webmaster has (so he says?) activated SSI's for my account.
> I have add the command <!--#flastmod name="welcome.shtml" --> to my
> HTML.
> I have saved the file as welcome.shtml
> now when I try to call the file Netscape sees it as an x-server-parsed
> file and not conventional html. So netscape just saves the file as a
> text file as per the setup for my helper apps.

> My assuption is that the file is not being parsed by the server. What I
> don't know is why? Any suggestions? Keep in mind I beleieve that my ISP
> webmaster has probably not configured the Apache software correctly.

When you turn on SSIs with Apache, you have to do two things:

edit srm.conf:

AddType text/x-server-parsed-html .shtml

*and* edit access.conf:

<Directory /your/dir/name/here>
Options Includes
...
</Directory>

(You may want to turn on IncludesNOEXEC... see the WWW Security FAQ
for more details on this.)

Also, I have Server parsed HTML turned on for all of my pages by
default. It is too useful as a document management strategy not
to have it turned on all the time. Accordingly, I have the above
AddType as follows:

AddType text/x-server-parsed-html .html

What happens above is this: the server associates .shtml files
with the type "text/x-server-parsed-html", and tries to treat
them accordingly (by parsing the file). It checks to make sure
that it is allowed to by the access.conf, then parses the file,
sending the parsed file back with a plain old "text/html" MIME
type. If you aren't allowed to use Server parsed HTML in your
directory, the parsing doesn't happen, the MIME type is not
changed, and you get ugliness on the client end.

Hope this helps.
Steve

PS: I have had trouble with Apache freaking out on me when I
make this change, so you may want to stop the server dead and
start it clean (from /etc/init.d/httpd or whatever) instead
of just sending it a kill -HUP.

--
Steven Champeon                                 (919) 469-7833


No Microsoft products were used while composing this message.

 
 
 

1. Clueless SSI/Apache question

I'm using Apache 1.2b4 (yes, I am going to upgrade soon) and have
completely failed to get server-side includes working. Clearly I'm
doing something wrong, but I've done all the right things I can
think of...

So:

  - My Apache is compiled with mod_include .
  - I have a file called, say, foo.html containing some SSI directives.
  - Its user and group execute permissions are set.
  - My httpd.conf file contains the following:

        AddHandler server-parsed .html
        <Directory /usr/local/www/data>
        Options Includes
        </Directory>        
        XBitHack full

    (the first line of which shouldn't be needed; anyway,
    removing it doesn't help.)

  - When I attempt to retrieve foo.html (which is in the
    directory /usr/local/www/data on my machine), the
    directives are just sent over as ordinary comments;
    no inclusion etc happens.
  - I have another identical file called, say, foo.shtml,
    and my httpd.conf also says

        AddHandler server-parsed .shtml
        AddType text/html .shtml

    ... and for *this* file, not only are the includes not parsed
    but the file is not being treated as HTML; it's being returned
    with content-type text/plain!

  - I am absolutely certain that my httpd.conf file isn't just
    being ignored; for instance, if I introduce a syntax error
    in the vicinity of the directives above and kill -1 the
    server process then an error is reported correctly.

It seems clear that I'm labouring under some dreadful misapprehension
about how things work, but it's not clear to me what misapprehension.
Can anyone help?

It may be relevant that I am using virtual hosts; the above
extract is from inside the relevant <VirtualHost>...</VirtualHost>
block.

In case it matters: I'm running FreeBSD 2.2.

Many thanks in advance. If you can easily mail me as well as (or
instead of) posting, that would be nice.

--
Gareth McCaughan       Dept. of Pure Mathematics & Mathematical Statistics,

2. password change server for Solaris 2.3?

3. HELP: Apache Virtual hosts & SSI

4. Announcing: Apache-1.0 Release

5. Apache & Perl & SSI

6. mailhost: sendmail vs. nsswitch.conf

7. Apache & SSI & Directory Permissions

8. /dev/cua1 irq change

9. HELP: Apache & SSI

10. Clueless needs a clue: how to set up SSI and successfully transmit .shtml files

11. Apache Password Question - All Apache webmasters need to know this!

12. bug in thr_keycreate ? or am I clueless ?

13. Have I been cracked or am I just clueless?