Koozali.org: home of the SME Server

server side includes

dave

server side includes
« on: November 23, 2003, 01:17:50 AM »
I have a web site that I've been using server side includes for some time.  This site's root directory has become cluttered and I wanted to update the site so I created a /dev dir and started a new site.  In that dir, I created an images dir, a common dir etc.  I built the site and I'm pleased with it and the group I host for is also happy with it's new look and I want to move everything to the site root.  I just copied the files, leaving the dev structure in place and now the page displays only this error:
Authorization Required
This server could not verify that you are authorized to access the document requested. Either you supplied the wrong credentials (e.g., bad password), or your browser doesn't understand how to supply the credentials required.
enywhere there is an include virtual directive.

For your reference, the root site is
www.lso.org
filesystem path:
/home/e-smith/files/ibays/lso

the dev site is
www.lso.org/dev
filesystem path:
/home/e-smith/files/ibays/lso/dev

Both locations contain exactly the same files, exactly the same directory structure (with the exception of the dev directory itself) and have exactly the same file access rights.

If change the structure such that all the included files all exist in the site root, everything works but creates a sloppy directory.  I'd like to be able to keep everything in related directories and eventually include some PHP/MySQL code so certain updates can be handled by the site owners.

I'm running SME Server 5.6, latest update from the ftp sites.
Any assistance would be greatly appreciated.

Dave

dave

Re: server side includes
« Reply #1 on: November 23, 2003, 02:24:18 AM »
Well, I couldn't have the site down any longer than it had already been so I went ahead and put everything in the root and pointed the SSI directives to ./ instead of .//

Can anyone tell me why it is happening and how to fix it?

Thanks,
Dave

Guck Puppy

Re: server side includes
« Reply #2 on: November 23, 2003, 07:00:09 AM »
dave wrote:

> For your reference, the root site is
> www.lso.org
> filesystem path:
> /home/e-smith/files/ibays/lso
>
> the dev site is
> www.lso.org/dev
> filesystem path:
> /home/e-smith/files/ibays/lso/dev

that would be /home/e-smith/files/ibays/lso/html/ etc. right?

G

Jimbo

Re: server side includes
« Reply #3 on: November 23, 2003, 12:35:26 PM »
Not played with ssi but when you moved the stuff from /ibays/lso/html/dev to /ibays/lso/html are there any places that refer to them in the oringinal /dev folder? Or is everything created relevant to the documents and not the site root?

dave

Re: server side includes
« Reply #4 on: November 23, 2003, 11:29:29 PM »
Guck Puppy: Yes, you're right.  The directories are:
/home/e-smith/files/ibays/lso/html/
and
/home/e-smith/files/ibays/lso/html/dev

Jimbo:
All paths are relative, see examples below.  
I read in Apache's SSI docs that relative paths aren't recommended but when I put something like:

in the *.shtml page files, I got the same errors.

here's more details:
I create a directory here:
/home/e-smith/files/ibays/lso/html/common
and put the file named:
links_top.html
in that dir and include the following line in index.shtml:

I get the access error message in the original post.

I put links_top.html in the website root directory and put the following in index.shtml:

and it works.

IF I have the directory structure as:
/home/e-smith/files/ibays/lso/html/dev/common
and put links_top.html in that directory and put:

in
/home/e-smith/files/ibays/lso/html/dev/index.shtml
it also works.

I figure it must be some kind of httpd.conf directive not allowing executable (is ssi truly executable?) content in a directory off the web sites root.  I've looked through the current httpd.conf but I can't find exactly where that rule/directive would be.  I've installed the .htaccess contrib hoping I can override the restriction but anything I put in the file causes a server error message to be displayed.  I've checked the apache documentation site and unfortunately I'm not having much luck interpreting things.

Thanks for any and all assistance...

Dave

Guck Puppy

Re: server side includes
« Reply #5 on: November 23, 2003, 11:34:04 PM »
dave wrote:

> here's more details:
> I create a directory here:
> /home/e-smith/files/ibays/lso/html/common
> and put the file named:
> links_top.html
> in that dir and include the following line in index.shtml:
>
> I get the access error message in the original post.

Ah hum! see :
http://forums.contribs.org/index.php?topic=16789.msg65026#msg65026

the use of a 'common' directory from the root of a server can cause problems.

G

dave

Re: server side includes
« Reply #6 on: November 24, 2003, 06:06:00 PM »
DUDE!!!

Well done and THANKS!!

I'll change the name of that dir and try it again.