Re: add httpd.conf directive
[EMAIL PROTECTED] wrote: I'm running mp1 with PerlAccessHandler handler. I want to add some config directive into httpd.conf,and let my module use them for passing auth. ie,in httpd.conf I add these lines, PassAuthIPs12.34.56.78 23.45.67.89 Then the requests from these IPs would get past. Isn't that easier to do with the following standard Apache directives (independently of mod_perl) ? Deny from all Allow from (list of IP's) If the above is not applicable, then you could use something like PerlSetVar AllowedIps "ip1 ip2 ip3" ... and in your module do sub handler { my $r = shift; # the request object my $AllowedIps = $r->dir_config('AllowedIps') || ''; # get "ip1 ip2 ip3" ... } and I guess there must be a function in mod_perl to get the IP from which the request is coming, to compare. Hope this helps.
Re: add httpd.conf directive
2007/9/17, André Warnier <[EMAIL PROTECTED]>: > > If the above is not applicable, then you could use something like > >PerlSetVar AllowedIps "ip1 ip2 ip3" >... > > > and in your module do > > sub handler { >my $r = shift; # the request object >my $AllowedIps = $r->dir_config('AllowedIps') || ''; # get "ip1 ip2 ip3" >... > } Also you can add them in httpd.conf, PerlAddVar PassAuthIPs 11.11.11.11 PerlAddVar PassAuthIPs 22.22.22.22 PerlAddVar PassAuthIPs 33.33.33.33 and in modperl handler, @pass_ips = $r->dir_config->get('PassAuthIPs'); this would get the IPs you set with PassAuthIPs in httpd.conf.
-X and trapping kill?
Must be Monday. Is there a problem with the -X switch and prefork? I'm using: Apache/2.2.3 (Debian) mod_ssl/2.2.3 OpenSSL/0.9.8e mod_perl/2.0.2 Perl/v5.8.8 I have a very small config and when I run with -X it starts a single process but I can't control-C to kill it. I can't even kill from another xterm, I have to kill -9 it. Tried also on Ubuntu, but it's the same versions as above. -- Bill Moseley [EMAIL PROTECTED]
Re: -X and trapping kill?
Bill Moseley wrote: Must be Monday. Is there a problem with the -X switch and prefork? I'm using: Apache/2.2.3 (Debian) mod_ssl/2.2.3 OpenSSL/0.9.8e mod_perl/2.0.2 Perl/v5.8.8 I have a very small config and when I run with -X it starts a single process but I can't control-C to kill it. I can't even kill from another xterm, I have to kill -9 it. Tried also on Ubuntu, but it's the same versions as above. Just to rule out that it's not the terminal causing the problem, what happens if you run a program like this and ctrl+c? I'm not seeing the behavior you are describing with 2.2.4/2.0.3/5.8.8 on darwin. #!perl use strict; use warnings; $SIG{INT} = sub { warn('hello interrupt') }; while (1) { next; }
Re: -X and trapping kill?
Hi guys, this is a known issue reported at http://issues.apache.org/bugzilla/show_bug.cgi?id=38848 and not modperl related. On 9/18/07, Fred Moyer <[EMAIL PROTECTED]> wrote: > > Bill Moseley wrote: > > Must be Monday. Is there a problem with the -X switch and prefork? > > > > I'm using: > > > > Apache/2.2.3 (Debian) mod_ssl/2.2.3 OpenSSL/0.9.8e mod_perl/2.0.2 > Perl/v5.8.8 > > > > > > I have a very small config and when I run with -X it starts a single > > process but I can't control-C to kill it. I can't even kill from > > another xterm, I have to kill -9 it. > > > > Tried also on Ubuntu, but it's the same versions as above. > > Just to rule out that it's not the terminal causing the problem, what > happens if you run a program like this and ctrl+c? I'm not seeing the > behavior you are describing with 2.2.4/2.0.3/5.8.8 on darwin. > > #!perl > > use strict; > use warnings; > > $SIG{INT} = sub { warn('hello interrupt') }; > > while (1) { > next; > } >
Re: add httpd.conf directive
[EMAIL PROTECTED] wrote: > Hello, > > I'm running mp1 with PerlAccessHandler handler. > I want to add some config directive into httpd.conf,and let my module > use them for passing auth. > ie,in httpd.conf I add these lines, > > PassAuthIPs12.34.56.78 23.45.67.89 > > Then the requests from these IPs would get past. > How can I do it?thanks. You can implement your own httpd.conf directives with some effort: http://perl.apache.org/docs/1.0/guide/config.html#Adding_Custom_Configuration_Directives and http://perl.apache.org/docs/2.0/user/config/custom.html But, for simple needs, you should also consider using PerlSetVar http://perl.apache.org/docs/2.0/user/config/config.html#C_PerlSetVar_ Philippe M. Chiasson GPG: F9BFE0C2480E7680 1AE53631CB32A107 88C3A5A5 http://gozer.ectoplasm.org/ m/gozer\@(apache|cpan|ectoplasm)\.org/ signature.asc Description: OpenPGP digital signature
Re: -X and trapping kill?
Bill Moseley wrote: > Must be Monday. Is there a problem with the -X switch and prefork? > > I'm using: > > Apache/2.2.3 (Debian) mod_ssl/2.2.3 OpenSSL/0.9.8e mod_perl/2.0.2 Perl/v5.8.8 for Apache/2.x, Shouldn't that now be: $> httpd -DONE_PROCESS -DNO_DETACH Philippe M. Chiasson GPG: F9BFE0C2480E7680 1AE53631CB32A107 88C3A5A5 http://gozer.ectoplasm.org/ m/gozer\@(apache|cpan|ectoplasm)\.org/ signature.asc Description: OpenPGP digital signature