Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relative filenames do not work with mod_proxy_fcgi #42

Open
Takios opened this issue Feb 6, 2018 · 0 comments
Open

Relative filenames do not work with mod_proxy_fcgi #42

Takios opened this issue Feb 6, 2018 · 0 comments

Comments

@Takios
Copy link

Takios commented Feb 6, 2018

Hello,

we have a PHP-FPM environment that's getting called by Apache via mod_proxy_fcgi:

    <Proxy "fcgi://localhost/">
        ProxySet timeout=86400
        SetEnv proxy-chain-auth On
    </Proxy>

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

Enabling XSendFile and setting the header to just a filename:

<?php
header("X-Sendfile: test.txt");

Leads to an error, because the path mod_xsendfile is looking at has the proxy stuff prepended to it:

2018-02-06T15:11:39+01:00 example apache[4377]: [:error] [pid 4377:tid 3077586256] (2)No such file or directory: [client X.X.X.X:44044] xsendfile: cannot open file: proxy:fcgi://localhost//home/www/test.txt

Path should be /home/www/test.txt

Greetings,
Takios

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant