I know, there are many questions related to this topic, but for some reason none of the other solutions worked for me. So here it goes:
When I'm accessing a subfolder in my root folder /dev/
containing PHP files, all I get is a blank white page, with no content when I look in the source.
Do you have any idea why this is happening?
Here are my configurations
/etc/php5/fpm/pool.d/www.conf
[www]
prefix = /var/log/php5-fpm/
user = marian
group = marian
listen = 127.0.0.1:9000
listen.backlog = 128
listen.allowed_clients = 127.0.0.1
pm = dynamic
pm.max_children = 30
pm.start_servers = 5
pm.min_spare_servers = 5
pm.max_spare_servers = 10
pm.process_idle_timeout = 10s;
pm.max_requests = 500
pm.status_path = /status
ping.path = /ping
ping.response = pong
access.log = /var/log/php5-fpm/access.log
access.format = "%R - %u %t \"%m %r%Q%q\" %s %f %{mili}d %{kilo}M %C%%"
slowlog = slow.log
request_slowlog_timeout = 10s
request_terminate_timeout = 30s
rlimit_files = 131072
rlimit_core = 0
chdir = /
catch_workers_output = yes
env[HOSTNAME] = $HOSTNAME
env[PATH] = /usr/local/bin:/usr/bin:/bin
env[TMP] = /tmp
env[TMPDIR] = /tmp
env[TEMP] = /tmp
php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f [email protected]
php_flag[display_errors] = on
php_admin_value[error_log] = /var/log/php5-fpm/error.log
php_admin_flag[log_errors] = on
/etc/nginx/sites-available/server.com
server {
listen 80;
root /home/marian/server.com;
index index.php index.html index.htm;
server_name server.com *.server.com;
error_log /home/marian/server.com/error.log notice;
access_log /home/marian/server.com/access.log main;
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param DOCUMENT_URI $document_uri;
fastcgi_param DOCUMENT_ROOT $document_root;
fastcgi_param SERVER_PROTOCOL $server_protocol;
fastcgi_param GATEWAY_INTERFACE CGI/1.1;
fastcgi_param SERVER_SOFTWARE AGP;
fastcgi_param REMOTE_ADDR $remote_addr;
fastcgi_param REMOTE_PORT $remote_port;
fastcgi_param SERVER_ADDR $server_addr;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_NAME $server_name;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
try_files $uri = /index.php?$args;
fastcgi_intercept_errors on;
}
location ~* \.(gif|jpg|jpeg|png|ico|wmv|3gp|avi|mpg|mpeg|mp4|flv|mp3|ogg|mid|js|css|wml|swf|woff|ttf|html|htm)$ {
fastcgi_hide_header Set-Cookie;
gzip on;
#expires max;
#add_header Pragma public;
#add_header Cache-Control "public, must-revalidate, proxy-revalidate";
#add_header Access-Control-Allow-Origin *;
}
location ~ /\.ht {
deny all;
}
}
UPDATE:
The error caught in the logs is:
rewrite or internal redirection cycle while internally redirecting to "/index.php", client: <IP>, server: server.comt, request: "GET /feed/ HTTP/1.1", host: "www.server.com"
But I have no index.php
in the root, just index.html
and there are no errors caught in the subfolder /dev/
/feed/
, not/dev/
. Is/dev/index.php
attempting to redirect there?gzip on;
on jpg, gif and other compressed format isn't desirable.