RE: Compiling Apache modules for windows
Hi Günter, A couple of weeks ago I asked in the Apache developpers' list if anyone could compile a third party module (mod_replace) for Windows, and you were very kind and did it. These two weeks I've been trying the module, which sometimes works and sometimes doesn't. After much investigating, I realized that the replace filter works with pages that are under 32 KB, and doesnt't work if they're bigger. I've been looking in the mod_replace sources and I've seen that there's a constant declared at the beginning which says "#define START_SIZE (32 * 1024)". I think that's the key, because after that it makes a malloc with that size. For my purposes, I would need it to be at least 200 KB, but for general purposes (for including that module in your third party modules page), I think it should be at least 500 KB. I've made the changes in the source code and I send it attached, would you be so kind as to recompile it? Thanks in advance, Igor Leturia >-Jatorrizko mezua- >Nondik: Günter Knauf [mailto:eflash@;gmx.net] >Bidalia: Ostirala, 2002.eko urriak 11 20:01 > >Hi Igor, >> I'm interested in a third party module for Apache that I >>found in the >> internet, but there's only the source code of it (a .c file), not the >> .so file. I'm a windows user, and I read in the Apache website's faq >if that's the module you found: >http://pihl.kumpu.org/apache2/ >then you can get a binary here: >http://www.gknw.de/development/apache/httpd-2.0/win32/modules/mod_repla ce-0.3-2.0.43-w32.zip > >> that "only a limited number of the developers have the capability to >> build the InstallShield package" for windows. Is building >>the .so very >> complicated? What would I need? Is there a doc that explains it? >http://httpd.apache.org/docs-2.0/platform/win_compiling.html mod_replace.c Description: mod_replace.c
RE: Compiling Apache modules for windows
Igor, You have to put the replace entries like this: Replace colour color text/html SetOutputFilter REPLACE ProxyPass /someloc http://Server/someloc ProxyPassReverse /someloc http://Server/someloc Best regards, Juan C. Rivera Citrix Systems, Inc. -Original Message- From: Igor Leturia [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 15, 2002 6:06 AM To: [EMAIL PROTECTED] Subject: Re: Compiling Apache modules for windows Hi all! Günter sent me a binary version of mod_replace. I started trying it and I couldn't get it to work. At last I found that there is an error in the example configuration file. Instead of being 'Replace colour color text/html', it should be 'Replace "colour" "color" text/html'. At least this is the only way it worked for me. I say this in case anyone is interested. Now I've got some questions. I've been able to make replacements in the files if they have .html extension, but not in the rest (.js, etc.). In the example cfg you sent me, this is what you said (with my correction already done): Replace "colour" "color" text/html AddOutputFilter REPLACE html I've tried writing "js" instead of "html" in the second line, but I don't know what to write in the first line instead of "text/html". I've tried lots of things but none work. What should I do to apply the replacements to all the files served, independent of their extension? I tried *, but it doesn't work. Another question: do you know how should I write the httpd.conf to make the replacements to files proxied from another server? I wrote this, but it doesn't work: Replace colour color text/html AddOutputFilter REPLACE html ProxyPass http://someserver/someloc ProxyPassReverse http://someserver/someloc I've tried different orders of the lines, but none worked. Thanks in advance, Igor Leturia
Re: Compiling Apache modules for windows
Hi all! Günter sent me a binary version of mod_replace. I started trying it and I couldn't get it to work. At last I found that there is an error in the example configuration file. Instead of being 'Replace colour color text/html', it should be 'Replace "colour" "color" text/html'. At least this is the only way it worked for me. I say this in case anyone is interested. Now I've got some questions. I've been able to make replacements in the files if they have .html extension, but not in the rest (.js, etc.). In the example cfg you sent me, this is what you said (with my correction already done): Replace "colour" "color" text/html AddOutputFilter REPLACE html I've tried writing "js" instead of "html" in the second line, but I don't know what to write in the first line instead of "text/html". I've tried lots of things but none work. What should I do to apply the replacements to all the files served, independent of their extension? I tried *, but it doesn't work. Another question: do you know how should I write the httpd.conf to make the replacements to files proxied from another server? I wrote this, but it doesn't work: Replace colour color text/html AddOutputFilter REPLACE html ProxyPass http://someserver/someloc ProxyPassReverse http://someserver/someloc I've tried different orders of the lines, but none worked. Thanks in advance, Igor Leturia
Re: Compiling Apache modules for windows
Hi Igor, > I'm interested in a third party module for Apache that I found in the > internet, but there's only the source code of it (a .c file), not the > .so file. I'm a windows user, and I read in the Apache website's faq if that's the module you found: http://pihl.kumpu.org/apache2/ then you can get a binary here: http://www.gknw.de/development/apache/httpd-2.0/win32/modules/mod_replace-0.3-2.0.43-w32.zip > that "only a limited number of the developers have the capability to > build the InstallShield package" for windows. Is building the .so very > complicated? What would I need? Is there a doc that explains it? http://httpd.apache.org/docs-2.0/platform/win_compiling.html Guenter.
Re: Compiling Apache modules for windows
Hi Igor, please send me the source or a link where I can find it; and I'll give it a try... in addition you can take a look on my site where you can find a bunch of other module binaries for Win32: http://www.gknw.de/development/apache/ Guenter. > I'm interested in a third party module for Apache that I found in the > internet, but there's only the source code of it (a .c file), not the > .so file. I'm a windows user, and I read in the Apache website's faq > that "only a limited number of the developers have the capability to > build the InstallShield package" for windows. Is building the .so very > complicated? What would I need? Is there a doc that explains it? If you > think it would be impossible for a newbie, is there a way for any of you > to compile the module for me? > By the way, I think the module is very interesting not only for me, > but for many people. It is called mod_replace, and it can make > replacements in the content of the pages served. I think this would be a > very useful feature for Apache. Maybe it can be included in the Apache > distribution in a near future, after the necessary testings, releases, > betas, etc.? > Thanks in advance, > Igor Leturia