On 2019-12-29 12:07, Vadim Zhukov wrote:
I have setup like below working for me, with base httpd and php-7.3
package. I have PHP web app installed into /var/www/webapp directory,
with 'web' subdirectory serving as HTTP root, and I only want to
handle request paths starting with '/api' here.

The /etc/httpd.conf:

server "my.server" {
         listen on * port 80
         location "/api/*" {
                 root "/webapp/web"
                 directory index "index.php"
                 fastcgi socket "/run/php-webapp.sock"
         }
}

And the PHP FastCGI conf snip:

[webapp]
user = $pool
group = $pool
listen = /var/www/run/php-$pool.sock
listen.owner = www
listen.group = www
listen.mode = 0660

chroot = /var/www/$pool

This is essentially the same thing I am trying to do with the difference only in 'location "/api/*" and directory index. And with these changes it still doesn't work.

I get SCRIPT_FILENAME passed from httpd relative to httpd chroot (/site1/htdocs/... ) and PHP being chrooted into /var/www/site1 needs that to be relative to it's own chroot (/htdocs/...).

I tried with slowcgi which makes it easy to see environment that's passed and it's the same.

--
Nazar

Reply via email to