Re: Advanced Mass Hosting Module

2003-03-15 Thread Nathan Ollerenshaw
On Sunday, March 16, 2003, at 12:45 PM, Ian Holsman wrote:

I was looking at the code, and I think we could acheive alot if we 
replaced
the calls
to the vhost-parsing code on
http://lxr.webperf.org/source.cgi/server/protocol.c#L980 &
http://lxr.webperf.org/source.cgi/server/connection.c#L203

with 2 hooks. this would give the added benefit of moving the 
name-based
virtual hosting
into modules/http where it belongs.

we would still have a problem creating the server configs on the fly, 
but
that is a smaller problem
which the module writer could attempt.
Ok. This would probably be a much better solution than what I was 
originally proposing. (I'm not sure I made a very clear proposal, btw).

If we can futz around with the vhosts that apache thinks it has in 
memory, *and* somehow age them and remove them if they don't get 
accessed in a specified amount of time, we would run an awful amount of 
*individually configured* vhosts off a single apache instance and never 
have to graceful it.

Which is my ultimate aim, at any rate.

Nathan.

--
Nathan Ollerenshaw - Systems Engineer - Shared Hosting
ValueCommerce Japan - http://www.valuecommerce.ne.jp
In the days, When we were swinging form the trees
I was a monkey, Stealing honey from a swarm of bees
I could taste, I could taste you even then
And I would chase you down the wind


Re: Advanced Mass Hosting Module

2003-03-15 Thread Ian Holsman
Tony Finch wrote:
On Sat, Mar 15, 2003 at 11:14:44AM -0500, Nomentsoa-Tahiry Ramanampanoharana wrote:

Instead of writing a new module from the scratch. I don't
know if it's a good idea to look at mod_rewrite RewriteMap
internal function first.


I recommend against using mod_rewrite wherever possible. Yes it is
essential in some situations, but frequently you will be better off with
mod_alias and therefore much less hair. Everything that mod_vhost_alias
does can be done with mod_rewrite, but enabling mod_rewrite and therefore
letting customers use it is a scary prospect. With great power comes
great responsibility, and users are far too frequently irresponsible.
Tony.
I was looking at the code, and I think we could acheive alot if we replaced the 
calls
to the vhost-parsing code on
http://lxr.webperf.org/source.cgi/server/protocol.c#L980 &
http://lxr.webperf.org/source.cgi/server/connection.c#L203
with 2 hooks. this would give the added benefit of moving the name-based virtual 
hosting
into modules/http where it belongs.
we would still have a problem creating the server configs on the fly, but that is a 
smaller problem
which the module writer could attempt.


Re: Re: Advanced Mass Hosting Module

2003-03-15 Thread Tony Finch
On Sat, Mar 15, 2003 at 11:14:44AM -0500, Nomentsoa-Tahiry Ramanampanoharana wrote:
>
> Instead of writing a new module from the scratch. I don't
> know if it's a good idea to look at mod_rewrite RewriteMap
> internal function first.

I recommend against using mod_rewrite wherever possible. Yes it is
essential in some situations, but frequently you will be better off with
mod_alias and therefore much less hair. Everything that mod_vhost_alias
does can be done with mod_rewrite, but enabling mod_rewrite and therefore
letting customers use it is a scary prospect. With great power comes
great responsibility, and users are far too frequently irresponsible.

Tony.
-- 
f.a.n.finch  <[EMAIL PROTECTED]>  http://dotat.at/
LOUGH FOYLE TO CARLINGFORD LOUGH: SOUTHEAST 5 OR 6, DECREASING 4 OR 5. FAIR.
GOOD. MODERATE.


[Fwd: Re: PR 8889: 1.3 apidoc is broken and I don't know how to fix:)]

2003-03-15 Thread Erik Abele
Just pinging another time... perhaps somebody can have a look at this.

It's all fixed and in CVS but I don't have enough karma (and knowledge) 
to fix this by myself :(

cheers,
Erik
 Original Message 
Subject: Re: PR 8889: 1.3 apidoc is broken and I don't know how to fix 
Date: Sat, 01 Mar 2003 17:34:48 +0100
From: Erik Abele <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED], [EMAIL PROTECTED]
References: <[EMAIL PROTECTED]> 
<[EMAIL PROTECTED]>

André Malo wrote:
* André Malo wrote:

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8889

All the links inside of the text are causing 404s (missing apidoc_ prefix
and .html suffix). Where is that stuff stored and generated? Although it's
1.3 we should keep it clean :)
hmm. It seems, I'm not the right person to fix that. Can someone with more 
knowledge about that fun explain me how to the actual online apidoc is/was 
built or much better, fix it? ;-))
I've fixed that in cvs:/site-tools/httpd-docs/APIdict.pm r1.6 but I 
don't have a clue how this gets on the website. I guess it's checked out 
into the appropriate dir on daedalus and then built over there, but 
since I don't have an account on daedalus, we'll need somebody else to 
fix this :)

Can anybody please take the required steps and update the website 
(http://httpd.apache.org/dev/apidoc/)? You'll need the following:

- cvs:/httpd-docs-1.3/apidoc/*
- cvs:/site-tools/httpd-docs/APIdict.pm
- cvs:/site-tools/httpd-docs/mkapidict
and then execute

./mkapidict -l0 -d api.list -o index.html -t api-dict.html -v

TIA and cheers,
Erik
--
- - - - - - - - - - - - - - - - - - - - - -
Erik Abele   ~   http://www.codefaktor.de/
[EMAIL PROTECTED] ~ [EMAIL PROTECTED]
- - - - - - - - - - - - - - - - - - - - - -


RE: [Win32] compiling Apache 2.1.0-dev: missing sslc.h

2003-03-15 Thread MATHIHALLI,MADHUSUDAN (HP-Cupertino,ex1)

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
[snip]
> Visual C++ 6.0 compiler so I never run buildconf :-(

Well, basically, the configure script has to be re-generated. I don't know
how it's to be done without running buildconf.
Win32 experts, can you please help ?.

> > 2. Verify, after the configure, you should have the -DHAVE_OPENSSL flag
set
> > to '1' in the ap_config_auto.h
> 
> I searched for this file to change this flag but I cannot find the file, 
> only a acconfig.h with a
> /* Define this if we are building with OpenSSL */
> #undef HAVE_OPENSSL
> but changing this flag doesn't help.

Oh.. There should be some include/ap*.h file generated at the end of the
configure phase. On Unix, it's ap_config_auto.h. I expect the same for Win32
also - is it different ?.

> > 3. If not, pl. set "-DHAVE_OPENSSL" in your compile flags, 
> AND please let me know.
> 
> I tried -DHAVE_OPENSSL as compiler argument in the program 
> settings with no success.

Let me see if there are any other options.


(Looking for help from Win32 developers)
-Madhu


Re: mod_advanced_masshosting Sourceforge project started.

2003-03-15 Thread Philip M. Gollucci
My C's not half bad, but I'm not that great with apache internals. Although
I am picking at my own modules for apache2.  I've got 
autoconf/automake/libtool for configuration systems.  Never used and LDAP 
though.  I don't have much time, but I'd be willing to help out if I can.



On Saturday 15 March 2003 16:39, Nathan Ollerenshaw wrote:
> Ok,
>
> I've ambitiously started a sf.net project in the hopes that I will
> actually find someone to help me write this module; if you're
> interested in writing code for it then please let me know.
>
> The sf.net project homepages is at
> http://advancedhosting.sourceforge.net/
> and the project is at http://sourceforge.net/projects/advancedhosting/
>
> Note that there is nothing there yet, just the project, and my original
> mail. As I said, if you're willing to help code it, your expertise
> would be graciously accepted (my c skills are still embryonic, at best).
>
> I know that one of you, at least, mailed me offering coding help - if
> you could contact me again, that would be great - I lost your email
> somehow.
>
> Regards,
>
> Nathan.

-- 
END 
-- 
Philip M. Gollucci [EMAIL PROTECTED] 301.474.9294 301.646.3011 (cell) 

Science, Discovery, & the Universe (UMCP) 
Webmaster & Webship Teacher 
URL: http://www.sdu.umd.edu 

eJournalPress 
Database/PERL Programmer & System Admin 
URL : http://www.ejournalpress.com 

Resume : http://p6m7g8.net/Resume 



mod_advanced_masshosting Sourceforge project started.

2003-03-15 Thread Nathan Ollerenshaw
Ok,

I've ambitiously started a sf.net project in the hopes that I will 
actually find someone to help me write this module; if you're 
interested in writing code for it then please let me know.

The sf.net project homepages is at 
http://advancedhosting.sourceforge.net/
and the project is at http://sourceforge.net/projects/advancedhosting/

Note that there is nothing there yet, just the project, and my original 
mail. As I said, if you're willing to help code it, your expertise 
would be graciously accepted (my c skills are still embryonic, at best).

I know that one of you, at least, mailed me offering coding help - if 
you could contact me again, that would be great - I lost your email 
somehow.

Regards,

Nathan.

--
Nathan Ollerenshaw - Systems Engineer - Shared Hosting
ValueCommerce Japan - http://www.valuecommerce.ne.jp
Unscrew the wine, she'll throw a party line,
Stories extreme, she's such a drama queen,
Cries through the night, she choked on Marlboro lites,
Pure charm and grace, she hates her pretty face.


Re: [Win32] compiling Apache 2.1.0-dev: missing sslc.h

2003-03-15 Thread Juergen Heckel
MATHIHALLI,MADHUSUDAN (HP-Cupertino,ex1) wrote:
1. Please re-run buildconf before you start the configure [I hope you did it
earlier also].
Hi,
thank you for your answer.
Excuse my ignorance, I am not a C programmer I only can start Microsoft 
Visual C++ 6.0 compiler so I never run buildconf :-(

2. Verify, after the configure, you should have the -DHAVE_OPENSSL flag set
to '1' in the ap_config_auto.h
I searched for this file to change this flag but I cannot find the file, 
only a acconfig.h with a
/* Define this if we are building with OpenSSL */
#undef HAVE_OPENSSL
but changing this flag doesn't help.

3. If not, pl. set "-DHAVE_OPENSSL" in your compile flags, AND please let me
know.
I tried -DHAVE_OPENSSL as compiler argument in the program settings with 
no success.
So none of your tips does help me :-(

Regards
--
Juergen Heckel


Re: Advanced Mass Hosting Module

2003-03-15 Thread Nathan Ollerenshaw
On Sunday, March 16, 2003, at 01:14 AM, Nomentsoa-Tahiry 
Ramanampanoharana wrote:

Instead of writing a new module from the scratch. I don't know if it's 
a
good idea to look at mod_rewrite RewriteMap internal function first.
Maybe.

Something to look at, at least!

Thanks,

Nathan.

--
Nathan Ollerenshaw - Systems Engineer - Shared Hosting
ValueCommerce Japan - http://www.valuecommerce.ne.jp
I'm your blubber boy you should rub me
The sun beat me down too viciously
I fell into the ground to what I used to be
I've melted away I'm nothing again


Re: Re: Advanced Mass Hosting Module

2003-03-15 Thread Nomentsoa-Tahiry Ramanampanoharana
Instead of writing a new module from the scratch. I don't know if it's a good idea to 
look at mod_rewrite RewriteMap internal function first. From mod_rewrite documentation 
(http://httpd.apache.org/docs-2.0/mod/mod_rewrite.html#rewritemap), it written:

"Here the source is an internal Apache function. Currently you cannot create your own, 
but the following functions already exists:"

Actually, this is not true anymore in Apache 2 since you can write your own internal 
functions now.

So what I suggest is that your module should register a function as a mod_rewrite 
RewriteMap internal function. In this way, you would have your advanced mass hosting 
needs and still have the power of mod_rewrite.

Tahiry

-Original Message-
From: Nathan Ollerenshaw <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Date: Sat, 15 Mar 2003 02:58:41 +0900
Subject: Re: Advanced Mass Hosting Module

On Saturday, March 15, 2003, at 01:13 AM, Thomas Eibner wrote:
> On Sat, Mar 15, 2003 at 01:00:18AM +0900, Nathan Ollerenshaw wrote:
>> I wasn't thinking of anything radical. Just have a hook to set the
>> handler for a particular document (if it matches .php or .php4) to the
>> PHP module if it's allowed to, and serve it as a normal document if
>> not. Etc.
>>
>> I've not had a great delve in the hooks but nothing has suggested in
>> what I've looked at that it's not possible.
>
> I'm not sure if it's as simple as you describe. What is to stop a user
> from placing a .htaccess file in a directory giving himself ability to
> give the right content type to execute a php script for instance?
> If you want suexec to work too, there might be further complications.
> (Just thinking out loud here) :)

You bring up a valid point, but I was thinking more of sbox. Thats what 
use use currently (because suexec didn't fit our model) and it works 
great. Though, there seems to be a bug where it's poisoning the 
environment ...

At any rate, if I'm interfering around the URI-to-filename translation 
phase first, I should be able to minimise any problems with .htaccess 
files. But, I don't know, I don't fully understand all the phases that 
I can interfere with just yet :)

There are other phases I've not really looked at as well which I could 
hook into to do extra sanity checks, I guess. But, I think, get the 
thing basically working, then narrow down all the annoying security 
holes it will make, eh?

>> I really need to get a proof-of-concept working; maybe this weekend if
>> my other half gives me a 'allowed to use computer' note for the 
>> teacher.
>
> What would you consider a proof-of-concept? I have my code lurking on 
> some
> machine in cvs if you want to take a look at it.

If my feeble coding skills are up to it :) I've requested a new sf.net 
project, so in a couple of days I should be able to put up my hacky 
bits of code.

Really, I only started programming C with a vengeance about a week ago. 
I'm an old perl hacker, and never felt a need to use C. So fear my
code. Expect apache to segfault. ;)

Nathan.

--
Nathan Ollerenshaw - Systems Engineer - Shared Hosting
ValueCommerce Japan - http://www.valuecommerce.ne.jp

I'm your blubber boy you should rub me
The sun beat me down too viciously
I fell into the ground to what I used to be
I've melted away I'm nothing again






Re: [PATCH] fix mod_dav If: weak etag comparison

2003-03-15 Thread Joe Orton
On Sat, Mar 15, 2003 at 11:36:03AM +, Joe Orton wrote:
> Hi, the change in r1.45 of dav/main/util.c doesn't seem to work, since
> weak etags look like W/"etag" not "W/etag" as the code expects.  Here is
> a fix:

Of course those strdups are now unnecessary since the string doesn't
need to be modified... here's a better fix:

--- modules/dav/main/util.c 3 Feb 2003 17:52:58 -   1.47
+++ modules/dav/main/util.c 15 Mar 2003 15:10:31 -
@@ -1073,30 +1073,20 @@
 case dav_if_etag:
 {
 const char *given_etag, *current_etag;
-char *new_etag;
 int mismatch;
 
 /* Do a weak entity comparison function as defined in
  * RFC 2616 13.3.3.
  */
-if (state_list->etag[0] == '"' &&
-state_list->etag[1] == 'W' &&
-state_list->etag[2] == '/') {
-new_etag = apr_pstrdup(p, state_list->etag);
-new_etag += 2;
-new_etag[0] = '"';
-given_etag = new_etag;
+if (state_list->etag[0] == 'W' &&
+state_list->etag[1] == '/') {
+given_etag = state_list->etag + 2;
 }
 else {
 given_etag = state_list->etag;
 }
-if (etag[0] == '"' &&
-etag[1] == 'W' &&
-etag[2] == '/') {
-new_etag = apr_pstrdup(p, etag);
-new_etag += 2;
-new_etag[0] = '"';
-current_etag = new_etag;
+if (etag[0] == 'W' && etag[1] == '/') {
+current_etag = etag + 2;
 }
 else {
 current_etag = etag;



RE: [Win32] compiling Apache 2.1.0-dev: missing sslc.h

2003-03-15 Thread MATHIHALLI,MADHUSUDAN (HP-Cupertino,ex1)
Huh !!.. I've tried building using OpenSSL 0.9.7 (and 0.9.6i,g,h,e,b).. I
guess there's some problem with the configure [not able to recognize OpenSSL
vs SSL-C, and hence not defining the -DHAVE_OPENSSL flag].

Since my knowledge of building on windows is limited, can you please try the
following :
1. Please re-run buildconf before you start the configure [I hope you did it
earlier also].
2. Verify, after the configure, you should have the -DHAVE_OPENSSL flag set
to '1' in the ap_config_auto.h
3. If not, pl. set "-DHAVE_OPENSSL" in your compile flags, AND please let me
know.

Thanks
-Madhu

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Friday, March 14, 2003 11:45 PM
> To: [EMAIL PROTECTED]
> Subject: [Win32] compiling Apache 2.1.0-dev: missing sslc.h
> 
> 
> Hi,
> I cannot compile the latest snapshots (with OpenSSL 0.9.7a) 
> without errors:
> 
> -Configuration: mod_ssl - Win32 Release
> Generating ssl_expr_parse.c/.h from ssl_expr_parse.y
> Compiling...
> ssl_expr_parse.c
> F:\Projects\MSVC\httpd-2.0\modules\ssl\ssl_toolkit_compat.h(13
> 9) : fatal 
> error C1083: Cannot open include file: 'sslc.h': No such file 
> or directory
> 
> Where should I search for this file?
> 
> Regards
> -- 
> Juergen Heckel
> 


[PATCH] fix mod_dav If: weak etag comparison

2003-03-15 Thread Joe Orton
Hi, the change in r1.45 of dav/main/util.c doesn't seem to work, since
weak etags look like W/"etag" not "W/etag" as the code expects.  Here is
a fix:

Index: modules/dav/main/util.c
===
RCS file: /home/cvspublic/httpd-2.0/modules/dav/main/util.c,v
retrieving revision 1.47
diff -u -r1.47 util.c
--- modules/dav/main/util.c 3 Feb 2003 17:52:58 -   1.47
+++ modules/dav/main/util.c 15 Mar 2003 11:29:04 -
@@ -1079,24 +1079,15 @@
 /* Do a weak entity comparison function as defined in
  * RFC 2616 13.3.3.
  */
-if (state_list->etag[0] == '"' &&
-state_list->etag[1] == 'W' &&
-state_list->etag[2] == '/') {
-new_etag = apr_pstrdup(p, state_list->etag);
-new_etag += 2;
-new_etag[0] = '"';
-given_etag = new_etag;
+if (state_list->etag[0] == 'W' &&
+state_list->etag[1] == '/') {
+given_etag = apr_pstrdup(p, state_list->etag + 2);
 }
 else {
 given_etag = state_list->etag;
 }
-if (etag[0] == '"' &&
-etag[1] == 'W' &&
-etag[2] == '/') {
-new_etag = apr_pstrdup(p, etag);
-new_etag += 2;
-new_etag[0] = '"';
-current_etag = new_etag;
+if (etag[0] == 'W' && etag[1] == '/') {
+current_etag = apr_pstrdup(p, etag + 2);
 }
 else {
 current_etag = etag;


Re: [Win32] compiling Apache 2.1.0-dev: missing sslc.h

2003-03-15 Thread Juergen Heckel
Cliff Woolley wrote:
On Sat, 15 Mar 2003, Juergen Heckel wrote:

Where should I search for this file?
You shouldn't need it. That's a bug.
Fine, thank you.

Regards
--
Juergen Heckel


Re: [Win32] compiling Apache 2.1.0-dev: missing sslc.h

2003-03-15 Thread Cliff Woolley
On Sat, 15 Mar 2003, Juergen Heckel wrote:

> Where should I search for this file?

You shouldn't need it. That's a bug.