You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Steve Benson <sb...@sdfair.com> on 2003/12/23 17:23:28 UTC

[users@httpd] 2nd Try: Cannot Access Includes Above Current Directory if using SSL

Sorry to ask again but I could use a suggestion or two.
I'm new to your list and configuring Apache with the SSL module enabled
and have a newbie configuration glitch I've not been able to resolve.
I'm very puzzled over why my scripts with included files, either SSI or
PHP, work fine outside of the SSL directory structure (but still at
similar nested levels in directory tree but not SSL). i.e. 
given that /www/sd/htdocs/include/middle.html exists
with index.shtml in /www/sd/htdocs/test (http) with the lines
<!--#include file="../include/middle.html" --> and 
<!--#echo var="DOCUMENT_NAME" --> run fine and middle.html is included
and the document name is displayed.  Excellent!

But the same index.shtml in /www/sd/htdocs/jobs (https) <!--#include
file="../include/middle.html" --> fails to include middle.html and the
error_log file reports: unable to include file
"/www/sd/htdocs/include/middle.html" in parsed file
/www/sd/htdocs/jobs/index.shtml Not problem with <!--#echo
var="DOCUMENT_NAME" --> the document name is displayed.  Only half
excelent.

I changed the SSI to <!--#include virtual="../include/middle.html" -->
as you suggested but the result was the same. I changed the relative
path used to absolute and also got the same result. I can use includes
in the SSL directory as long as they're at the same level or below. If I
move the above example (including the include directory) down one level
in the https directory tree i.e. given that
/www/sd/htdocs/jobs/include/middle.html exists with index.shtml in
/www/sd/htdocs/jobs/test (https) <!--#include
file="../include/middle.html" --> it also fails. So I can't go up even
within the https directory tree.  The same scenario under http presents
no problems.

The SSI is mostly for testing trying to figure out why my PHP scripts
are acting this way.  I'm trying to keep it simple so I can find the
root cause of my SSL (https) virtual server failure to work with upper
level include files.

I imagine there's something in my SSL configuration causing this but
after trying many <Directory>, <Location> and even a ScriptAlias changes
to the ssl.conf I've not been able to get around this.
I've created a number of Apache web sites but this is my first using
SSL(mod_ssl incorporated into Apache 2.0.48, openssl). I've never
encountered anything like this before in web development.
My configuration is: 
RH Linux Kernel 2.4.20-8, Apache 2.0.48, OpenSSL -0.9.6l, PHP 4.3.4,
Apache was compiled with SSL and SSI enabled. SSL appears to work OK
i.e. recognized by browser, cert and key accepted etc.

I appreciate any suggestions.

Thanks,

............ Steve