PDA

View Full Version : Getting Server Side Includes Working



CarbonRods
28th November 2004, 11:14 AM
Anybody know how to get SSI working in the ~/User/Site folders?

I have it working in the /Library/WebServer/Documents folder, but it doesn't logical for a user to be maintaining a site outside of their home directory.

Steve

iSlayer
28th November 2004, 12:32 PM
well by default it works on the apache root directory which is /library/webserver/documents.
maybe you could use a virtual host to trick apache

jmd
28th November 2004, 01:47 PM
Its a bit hard without seeing your httpd.conf file however I have had a look at the default on my OSX machine (I run apache off an ANS running Linux) my guess would be that where it states:

#
# Control access to UserDir directories. The following is an example
# for a site where these directories are restricted to read-only.
#
#<Directory /home/*/Sites>
# AllowOverride FileInfo AuthConfig Limit
# Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec

That entire seciton needs to be uncommented and the options line ammended to read:

Options MultiViews Indexes SymLinksIfOwnerMatch Includes

(the IncludesNoExec limits SSI to exclude including the result of cgi execution) and then restart the httpd demon.

Kind regards,

JD

CarbonRods
28th November 2004, 08:02 PM
Originally posted by jmd@Nov 28 2004, 01:47 PM
Its a bit hard without seeing your httpd.conf file however I have had a look at the default on my OSX machine (I run apache off an ANS running Linux) my guess would be that where it states:

#
# Control access to UserDir directories. The following is an example
# for a site where these directories are restricted to read-only.
#
#<Directory /home/*/Sites>
# AllowOverride FileInfo AuthConfig Limit
# Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec

That entire seciton needs to be uncommented and the options line ammended to read:

Options MultiViews Indexes SymLinksIfOwnerMatch Includes

JD
Thanks for the response, but unfortunately that didn&#39;t work. I also tried putting a .htaccess file in the ~/Sites folder with the line:

Options Indexes FollowSymLinks MultiViews Includes

And that didn&#39;t work either :-(

I have attached a copy of my httpd.conf file

Steve

jmd
29th November 2004, 05:48 AM
It looks like the conf file should work (I assume that you restarted apache after making the changes).

What do the log files show when the SSI&#39;s are called? Is there a permissions problem perhaps?

King regards,

JD

eyeLikeCarrots
29th November 2004, 03:09 PM
What about a CGI wrapper ?

CarbonRods
1st December 2004, 10:34 PM
Solved it&#33;

I discovered there is also an /etc/httpd/users/~.conf file that controls the ~/Sites folder. Once I added Includes to that file, SSI started working in the ~/Sites folder.

Lost a few hours sleep before I worked that out :-)

SR