I installed arch linux and nginx in a chroot (archlinux wiki). Thats working.
Now I want to get fastcgi running. I set the php-fpm socket to 127.0.0.1:9000 to reach it from the chroot (/srv/http).
While the html files are printed successfully the php-files are "not found". In the nginx-log I found this:
FastCGI sent in stderr: "primary script unknown" while reading response header from upstream, client: 10.211.55.2, server: localhost, request: "GET /phpinfo.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000:, host: "10.211.55.6".
So I think the php-fpm does not found the file, because the path is absolute in the nginx chroot and it searches in the real root. So I added, yes very ugly, the following to my settings, but there is no change of the result. How can I debug it, or better, find a clean solution?
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME /srv/http$document_root$fastcgi_script_name
}
Tanks a lot.