Re: [users@httpd] cgi script error output logging

2017-05-12 Thread Petr Gajdos
On Fri, May 12, 2017 at 09:16:29AM +0200, Petr Gajdos wrote:
> Hi,
> 
> On Thu, May 11, 2017 at 08:07:28AM +, KASPAR Sandro wrote:
> > Hi suomi,
> > 
> > 
> > Thank you for your answer. Unfortunately I am not using php-fpm but fcgid. 
> > As
>  
> JFYI, simple example [0] had shown that for me it does work with
> mod_cgi (tested with 2.4.25).

So I tried [1] also with httpd 2.4.25 and apache2-mod_fcgid 2.3.9 and
it seem to work for me,  if I understand correctly. The spec file
%check is a bit hard to read (work in progress), but I can provide you
%with minimal httpd.conf, if you wish.

Petr

[1] (search for APACHE MODULE TEST)

https://build.opensuse.org/package/live_build_log/Apache:Modules/apache2-mod_fcgid/openSUSE_Tumbleweed/x86_64
>

-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [users@httpd] cgi script error output logging

2017-05-12 Thread Petr Gajdos
Hi,

On Thu, May 11, 2017 at 08:07:28AM +, KASPAR Sandro wrote:
> Hi suomi,
> 
> 
> Thank you for your answer. Unfortunately I am not using php-fpm but fcgid. As
 
JFYI, simple example [0] had shown that for me it does work with
mod_cgi (tested with 2.4.25).

Petr

[0] https://github.com/pgajdos/apache-rex/tree/master/mod_cgi-stderr

-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [users@httpd] forward proxy cache, 2.4.25

2017-02-20 Thread Petr Gajdos
On Mon, Feb 20, 2017 at 10:28:26PM +0100, Yann Ylavic wrote:
> https://bz.apache.org/bugzilla/show_bug.cgi?id=60577
> 
> I just proposed a (new) patch there, could you test it and report back?

Ah, I really should have given search engine of the bugzilla a
chance.

Commented there.

Thanks!

Petr


-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



[users@httpd] forward proxy cache, 2.4.25

2017-02-20 Thread Petr Gajdos
Hi,

perhaps just a theoretical question. I have an example:

 httpd.conf --
ServerName test
User pgajdos
Group users
Listen 60080
PidFile /tmp/apache-rex/mod_proxy-cache/pid
ErrorLog /tmp/apache-rex/mod_proxy-cache/error_log
LoadModule auth_basic_module /usr/lib64/apache2-prefork/mod_auth_basic.so
LoadModule dir_module /usr/lib64/apache2-prefork/mod_dir.so
LoadModule authz_host_module /usr/lib64/apache2-prefork/mod_authz_host.so
LoadModule proxy_module /usr/lib64/apache2-prefork/mod_proxy.so
LoadModule proxy_http_module /usr/lib64/apache2-prefork/mod_proxy_http.so
LoadModule cache_module /usr/lib64/apache2-prefork/mod_cache.so
LoadModule log_config_module /usr/lib64/apache2-prefork/mod_log_config.so
LoadModule authz_core_module /usr/lib64/apache2-prefork/mod_authz_core.so
LoadModule cache_socache_module /usr/lib64/apache2-prefork/mod_cache_socache.so
LoadModule socache_shmcb_module /usr/lib64/apache2-prefork/mod_socache_shmcb.so
DocumentRoot /tmp/apache-rex/mod_proxy-cache/htdocs
DirectoryIndex index.html

### example configuration

LogFormat "%s %{cache-status}e" cache_format

Listen 60081

  ErrorLog "/tmp/apache-rex/mod_proxy-cache/error_log-backend"
  DocumentRoot "/tmp/apache-rex/mod_proxy-cache/htdocs-backend"
  
Require local
  


Listen 60082

  ErrorLog "/tmp/apache-rex/mod_proxy-cache/error_log-reverse-proxy"

  
ProxyPass "http://localhost:60081/;
  

  CacheSocache shmcb
  CacheSocacheMaxSize 102400
  CacheEnable socache "/"

  CacheHeader on

  CustomLog "/tmp/apache-rex/mod_proxy-cache/reverse-proxy-uncached.log" 
cache_format env=cache-miss
  CustomLog "/tmp/apache-rex/mod_proxy-cache/reverse-proxy-cached.log" 
cache_format env=cache-hit
  CustomLog "/tmp/apache-rex/mod_proxy-cache/reverse-proxy-revalidated.log" 
cache_format env=cache-revalidate


Listen 60083

  ErrorLog "/tmp/apache-rex/mod_proxy-cache/error_log-forward-proxy"
  LogLevel trace8

  ProxyRequests On
  
Require local
  

  CacheSocache shmcb
  CacheSocacheMaxSize 102400
  # http://httpd.apache.org/docs/current/mod/mod_cache.html#cacheenable
  CacheEnable socache http://localhost:60081/

  CacheHeader on

  CustomLog "/tmp/apache-rex/mod_proxy-cache/forward-proxy-uncached.log" 
cache_format env=cache-miss
  CustomLog "/tmp/apache-rex/mod_proxy-cache/forward-proxy-cached.log" 
cache_format env=cache-hit
  CustomLog "/tmp/apache-rex/mod_proxy-cache/forward-proxy-revalidated.log" 
cache_format env=cache-revalidate



While the behavior for reverse proxy is not changed, I get a
difference for forward proxy between 2.4.23 and 2.4.25: for 2.4.25, I
get no X-Cache header and also no reference to mod_cache in error_log
for trace8.

Where I am wrong?

Petr

-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [users@httpd] failing t/modules/filter.t

2016-11-03 Thread Petr Gajdos
On Wed, Oct 26, 2016 at 09:58:57AM +0200, Yann Ylavic wrote:
> On Tue, Oct 25, 2016 at 9:48 PM, Petr Gajdos <pgaj...@suse.cz> wrote:
> >
> > So if I understand correctly, content of mime.types is hardcoded.
> > Is there another chance than patching either TestConfig.pm or
> > extra.conf.in to contain application/xml .xml definition?
> 
> Don't you have a piece of conf that applies to your test and where you can 
> set:
>AddType application/xml .xml

Thank you, I guess problem resolved. 

I run testsuite on buildroot in two modes, with some sort of minimal
configuration file (given by -httpd_conf) and also manually for
debugging without -httpd_conf option at all, which seem to consult
/etc/apache2/httpd.conf to create t/conf/httpd.conf. Neither of them 
worked (for different reason from what I did not know until now) which
lead to confusion on my side.

If I get all correctly, in the first case the hardcoded mime.types I
have already mentioned is used. There is no xml assignment so no
wonder. In second case the testsuite detected /etc/apache2/mime.types
inclusion in /etc/apache2/httpd.conf and that file was included in
t/conf/httpd.conf.

But, /etc/apache2/mime.types contains:
application/xml  xml xsl
[..]
text/xml xml

According to my testing, the latter map shadowed the first one. When I
switched the order, the test worked.

Because of the hope, that the package I am just creating will be
installable and user will certainly use own mime.types, I would like
not to have a test depend on the order there. So I think that could
help me:
https://build.opensuse.org/package/view_file/Apache:Test/apache-test/apache-test-application-xml-type.patch

Petr


-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [users@httpd] failing t/modules/filter.t

2016-10-25 Thread Petr Gajdos
> On Wed, Sep 21, 2016 at 08:38:25PM +0200, Yann Ylavic wrote:
> > Without any AddType directive relative to ".xml" files in your
> > configuration, the Content-Type is set according to the
> > "conf/mimes.types" file.
> > What's in yours for the "xml" extension?
> 
> You are correct. There is no reference to xml extension in
> t/conf/*.conf or t/conf/mime.types. I will try to check how
> t/conf/mime.types is generated. 

In Apache-Test/lib/Apache/TestConfig.pm, there is:

sub types_config_template {
return <find_and_load_module('mod_mime.so');

unless ($self->{inherit_config}->{TypesConfig}) {
my $types = catfile $self->{vars}->{t_conf}, 'mime.types';
unless (-e $types) {
my $fh = $self->genfile($types);
print $fh $self->types_config_template;
close $fh;
}
$self->postamble(<

Re: [users@httpd] Any Modules required for ErrorDocument?

2016-10-04 Thread Petr Gajdos
Hello,

On Tue, Oct 04, 2016 at 02:54:45PM +0300, Jayaram Ponnusamy wrote:
> Redirect 404 /sites/en_US/404
> ErrorDocument 404 /sites/en_US/404

not sure what you want to achieve with Redirect directive, but an
example how to use ErrorDocument directive is here:

https://github.com/pgajdos/apache-rex/tree/master/core-ErrorDocument-basic

Petr


-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [users@httpd] Unit file of apache2.service changed on disk

2016-09-29 Thread Petr Gajdos
On Wed, Sep 28, 2016 at 02:19:14AM -0500, Ronald E. Raikes wrote:
> root@raspberrypi:~# service apache2 restart
> Warning: Unit file of apache2.service changed on disk, 'systemctl
> daemon-reload' recommended.
> root@raspberrypi:~#
> 
> Following the recommendation eliminates the warning:
> 
> root@raspberrypi:~# systemctl daemon-reload
> root@raspberrypi:~# service apache2 restart
> root@raspberrypi:~#
> 
> After a reboot, however, the problem is back. No changes are being made
> anywhere.

The report is already here (actually you made it?):
https://www.raspberrypi.org/forums/viewtopic.php?f=29=160476

Answer 'malicious ยป Fri Sep 23, 2016 10:36 pm' seems to be good point
to me. Assuming this is true, and something on each reboot writes
apache service file automatically, it should also call daemon-reload 
afterwards. The most correct fix would be to provide service file
for apache in my opinion.

In any case, that is not bug in apache itself, as was already said.
A bug to your distro is appropriate I think.

Petr


-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [users@httpd] failing t/modules/filter.t

2016-09-22 Thread Petr Gajdos
On Wed, Sep 21, 2016 at 08:38:25PM +0200, Yann Ylavic wrote:
> Without any AddType directive relative to ".xml" files in your
> configuration, the Content-Type is set according to the
> "conf/mimes.types" file.
> What's in yours for the "xml" extension?

You are correct. There is no reference to xml extension in
t/conf/*.conf or t/conf/mime.types. I will try to check how
t/conf/mime.types is generated. 

Thanks,
Petr


-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



[users@httpd] failing t/modules/filter.t

2016-09-21 Thread Petr Gajdos
Hi list,

the test does not succed for me. If I got it correctly, it creates
test.xml with the content 'helloworld' and tries to add CASEFILTER to
it trough AddOutputFilterByType with application/xml. That does not
work for me, but does with text/xml as example [1] shows.

Where the truth is?

Petr

[1] 
https://github.com/pgajdos/apache-rex/tree/master/mod_filter-AddOutputFilterByType


-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org