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/29 18:41:08 UTC

[users@httpd] Now Know Cause is Redirection Clause

I've made a bit of progress with the following problem.  I've now found
the cause anyway.  If I remove the redirection clause from httpd.conf,
all works as expected with my PHP or SSI include clauses.

I was using the redirect to prevent access to forms that require (for
security) they be accessed only via https.  Was I going overboard with
the redirection or is there another way to insure only https access or
should I just not worry about this?  Or maybe the redirection should
have been written differently? Opinions please.

The clause I had in httpd.conf:
<Directory "/www/sd/htdocs/jobs">
    Redirect /jobs https://172.16.1.2
</Directory>

Original post of problem with include directives:

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 


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] Now Know Cause is Redirection Clause

Posted by Don <dn...@san.rr.com>.
If you want to ensure ssl is used when accessing a specific directory, use
the SSLRequireSSL directory option.

Example, I used this for my squirrelmail directory:
<Directory /usr/share/squirrelmail>
SSLRequireSSL
</Directory>

If you want to redirect an http url to an https url, you need to get the
port number in there....
I forget the exact syntax. but basically redirect *:80 *:443  or something
like that...

This was asked/answered a week or so back... check the archives...

Cheers,
Don

-----Original Message-----
From: Steve Benson [mailto:sbenson@sdfair.com]
Sent: Monday, December 29, 2003 9:41 AM
To: users@httpd.apache.org
Subject: [users@httpd] Now Know Cause is Redirection Clause


I've made a bit of progress with the following problem.  I've now found
the cause anyway.  If I remove the redirection clause from httpd.conf,
all works as expected with my PHP or SSI include clauses.

I was using the redirect to prevent access to forms that require (for
security) they be accessed only via https.  Was I going overboard with
the redirection or is there another way to insure only https access or
should I just not worry about this?  Or maybe the redirection should
have been written differently? Opinions please.

The clause I had in httpd.conf:
<Directory "/www/sd/htdocs/jobs">
    Redirect /jobs https://172.16.1.2
</Directory>

Original post of problem with include directives:

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


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Too many open files

Posted by Aaron W Morris <aa...@mindspring.com>.
Richard Correia wrote:
> Hi,
> 
> I have apache 1.3.23 on red hat 7 platform.
> 
> My JSP engine is giving me error saying "Too many open files in system".
> 
> When I do 
> [www1@www bin]$ netstat -n | wc -l
>    5260
> 
> How will I know which daemon is eating my all open file descriptors.
> 
> 
> Thanks
> Rich


You need to increase the number of available file descriptors for your 
OS.  "ulimit -n 1000000" for the user may work.  There are also some 
kernel properties you may need to modify in the /proc filesystem.


-- 
Aaron W Morris <aa...@mindspring.com> (decep)




---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] Too many open files

Posted by Ben Yau <by...@cardcommerce.com>.
> Subject: [users@httpd] Too many open files
>
>
> Hi,
>
> I have apache 1.3.23 on red hat 7 platform.
>
> My JSP engine is giving me error saying "Too many open files in system".
>
> When I do
> [www1@www bin]$ netstat -n | wc -l
>    5260
>
> How will I know which daemon is eating my all open file descriptors.
>
>
> Thanks
> Rich
>
>

Hi.

Perhaps you're looking for "lsof" command .  That tells you what open files
a process has . I think each apache/httpd process takes the same number of
files open and it may be a matter of too many daemons started?

Anyway, lsof is a good place to look.

lsof | sort -n +7 -8 | grep -v [and the process you're looking for, apache]

sort -n +7 -8 will sort lsof output by process ID

Hope that's what you're looking for.

Ben Y


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


[users@httpd] Too many open files

Posted by Richard Correia <ri...@ugamsolutions.com>.
Hi,

I have apache 1.3.23 on red hat 7 platform.

My JSP engine is giving me error saying "Too many open files in system".

When I do 
[www1@www bin]$ netstat -n | wc -l
   5260

How will I know which daemon is eating my all open file descriptors.


Thanks
Rich


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org