Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: apache includes



On 30.04.2002 6:24 CET, Robert Dell <email@hidden> wrote:

> I found out exactly what i've been doing wrong all this time.
>
> At the bottom of the httpd.conf put the command:
> XBitHack full
>
> and in terminal, type:
> chmod +x index.html
>
> This activated the server side includes for that file. Each file you
> want to activate server includes on just chmod it.

Well, that is a way of doing it, allthough i consider it a little "hackish".

Usually, you just name your file index.shtml (or even index.ssi) instead
of.html to distinguish server-side-includes by file-extension.

This will work fine if you have a line like this in your httpd.conf:

<Directory />
Options FollowSymLinks Includes
AllowOverride None
</Directory>

The important part above is "includes" which enables server-side includes.

Now you need to map the includes to a file extension:

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

And maybe also take into account having an index-shtml also as default file
(which comes up when you only specify a path to a folder in an url):

DirectoryIndex index.htm index.html index.ssi index.shtml index.asis

I guess this all is even easier through the ServerAdmin GUI (which i don't
use) by just turning on "includes" for your host.


--
Stefan Seiz
Spamto: <email@hidden>
_______________________________________________
macos-x-server mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/macos-x-server
Do not post admin requests to the list. They will be ignored.



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.