Hello,
I'm in the process of moving my D7 site to nginx but I have run into the following problem.
When I log in using an account with some administrative privileges I get a blank screen. When I login as a normal authenticated user everything works fine.
Does anybody have any idea what might be causing this?
This is my config:
nginx.conf
user nginx;
worker_processes 1;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile off;
#tcp_nopush on;
keepalive_timeout 65;
#gzip on;
include /etc/nginx/conf.d/*.conf;
}default.conf
server {
listen 80;
server_name localhost;
charset utf-8;
#access_log /var/log/nginx/log/host.access.log main;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ .php$ {
root /usr/share/nginx/html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}domain.conf
server {
listen 80;
server_name domain.tld www.domain.tld;
#charset koi8-r;
#access_log /var/log/nginx/log/host.access.log main;
error_log /var/log/nginx/domain.tld.error.log info;
location / {
root /home/domain.tld;
index index.php index.htm;
error_page 404 = @drupal;
}
location @drupal {
if (!-e $request_filename) {
rewrite ^/(.*)$ /index.php?q=$1 last;
}
}
location ~ .php$ {
root /home/domain.tld;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
location ~ /.ht {
deny all;
}
}Error Log
Regardless of whether I login using a normal account (username: test) or an administrative account I get the same error quoted below.
Nothing else.
2013/08/03 14:33:24 [error] 7088#0: *57 open() "/home/domain.tld/users/test" failed (2: No such file or directory), client: 123.123.123.123, server: domain.tld, request: "GET /users/test HTTP/1.1", host: "www.domain.tld", referrer: "http://www.domain.tld/user/login"Before you comment on my config, please note that I know it's rather 'bare'. This is my first nginx installation and I'm going one step at time.
Once I overcome this problem I will proceed with making my configuration more Drupal friendly and robust using the excellent guides provided in this group (i.e. perusio/yhager).
Thanks in advance
Comments
It turns out this was a mysql
It turns out this was a mysql configuration issue.
max_allowed_packet had to be increased.
Thank you