httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Helmut K. C. Tessarek" <tessa...@evermeet.cx>
Subject Re: 2.4.27
Date Tue, 18 Jul 2017 18:43:20 GMT
On 2017-07-18 14:25, Eric Covener wrote:
> Argh, not right, missed the other return stmt.
> 
> It seems like proxy_trans will return OK to translate_name() and not
> let mod_rewrite in non-perdir run at all.  It is rigged to run before
> mod_rewrite.

Ok, it seems that my rewrite issue has gained a bit of attention, thus I
will explain it now in more detail (otherwise people don't know what I
am actually talking about):

<Directory "/var/www">
    Options FollowSymLinks
    AllowOverride None

    ErrorDocument 404 /404.php

    RewriteEngine On

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^([^\.]+)$ $1.php [NC,L]
    Require all granted
</Directory>

With mod_php I got the 404.php error page when going to:
https://example.com/te

With mod_proxy_fcgi I get a "File not found." error in the browser and
the following is in Apache's error_log:
[proxy_fcgi:error] AH01071: Got error 'Primary script unknown\n'

However, I get the 404.php error page, when going to:
https://example.com/te.t
https://example.com/te/

(So it works partly with proxy_fcgi.)

I'm still investigating why that is. I'm a bit pressed for time that's
why I haven't been able to look into it in more detail.
I have to setup a VM to debug this further, but IMO this is not ok.
In both cases the rewrite should work the same way.

My handler cfg looks like this:

<FilesMatch "\.php$">
    SetHandler  "proxy:unix:/var/run/php7-fpm/sample.sock|fcgi://sample"
</FilesMatch>

A rather simple use case, yet the bahaviour is different. Don't get me
wrong, but it shouldn't behave differently.

-- 
regards Helmut K. C. Tessarek              KeyID 0xF7832007C11F128D
Key fingerprint = 28A3 1666 4FE8 D72C CFD5 8B23 F783 2007 C11F 128D

/*
   Thou shalt not follow the NULL pointer for chaos and madness
   await thee at its end.
*/

Mime
View raw message