I was trying to configure chroot with php-fpm and mysql. I managed to work it out, however when I try to reach files other than index.php (like css, png etc.) it keeps giving 404.
However when I disable chroot, it works %100 correct.
My directory structure is like this;
/var/www #my chroot directory
/var/www/tmp #related pid and sock files
/var/www/log #related log directory
/var/www/public_html #wordpress directory
And my nginx configuration is like this;
server {
listen 80; ## listen for ipv4; this line is default and implied
root /public_html;
index index.php;
server_name _;
location / {
index index.php;
}
if (!-e $request_filename) {
rewrite ^.*$ /index.php last;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /public_html;
}
location ~ \.php$ {
fastcgi_pass unix:/var/www/tmp/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param APPLICATION_ENV production;
include fastcgi_params;
}
location ~ /\.ht {
deny all;
}
}
What do you think I am doing wrong ?
Thank you