Welcome! Log In Create A New Profile

Advanced

500 error - nginx - wordpress

Posted by dieg0 
500 error - nginx - wordpress
July 29, 2013 02:17AM
Hello,
I am new in nginx and I googled maybe for 5 hours and i cannot find solution.I wanna to run nginx server and I still get only 500 internal server error, please can you help me?
My congifuration :

nginx.conf
user www-data;
worker_processes 4;
pid /var/run/nginx.pid;

events {
worker_connections 1024;
# multi_accept on;
}

http {

##
# Basic Settings
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
# server_tokens off;

# server_names_hash_bucket_size 64;
# server_name_in_redirect off;

include /etc/nginx/mime.types;
default_type application/octet-stream;

##
# Logging Settings
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;

##
# Gzip Settings
gzip on;
gzip_disable "msie6";

##
# Virtual Host Configs
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
}

site : default
server {
root /home/www;
try_files $uri $uri/ /index.php?$args;
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
index index.php index.html index.htm;
autoindex on;
# Make site accessible from http://localhost/
server_name localhost;

location / {
try_files $uri $uri/ /index.php;
# Uncomment to enable naxsi on this location
# include /etc/nginx/naxsi.rules
}

location /doc/ {
alias /usr/share/doc/;
autoindex on;
allow 127.0.0.1;
allow ::1;
deny all;
}

#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$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
# NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini

# # With php5-cgi alone:
# fastcgi_pass 127.0.0.1:9000;
# # With php5-fpm:
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}

# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}

I will be so thankfull if you can help me.Thanks so much
Re: 500 error - nginx - wordpress
July 29, 2013 02:24AM
I forget to attach errorlog.Here it is:
2013/07/29 08:21:45 [error] 24428#0: *1 FastCGI sent in stderr: "PHP message: PHP Warning: require_once(/home/www/wp-includes/load.php): failed to open stream: Permission denied in /home/www/wp-load.php on line 48
PHP message: PHP Fatal error: require_once(): Failed opening required '/home/www/wp-includes/load.php' (include_path='.:/usr/share/php:/usr/share/pear') in /home/www/wp-load.php on line 48" while reading response header from upstream, client: 89.176.3.5, server: localhost, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "95.168.212.164"
2013/07/29 08:21:45 [error] 24428#0: *1 FastCGI sent in stderr: "PHP message: PHP Warning: require_once(/home/www/wp-includes/load.php): failed to open stream: Permission denied in /home/www/wp-load.php on line 48
PHP message: PHP Fatal error: require_once(): Failed opening required '/home/www/wp-includes/load.php' (include_path='.:/usr/share/php:/usr/share/pear') in /home/www/wp-load.php on line 48" while reading response header from upstream, client: 89.176.3.5, server: localhost, request: "GET /favicon.ico HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "95.168.212.164"
/var/log/nginx/error.log

[29-Jul-2013 07:56:43] NOTICE: fpm is running, pid 24336
[29-Jul-2013 07:56:43] NOTICE: ready to handle connections
[29-Jul-2013 08:21:24] NOTICE: Finishing ...
[29-Jul-2013 08:21:24] NOTICE: exiting, bye-bye!
[29-Jul-2013 08:21:24] NOTICE: fpm is running, pid 24457
[29-Jul-2013 08:21:24] NOTICE: ready to handle connections
[29-Jul-2013 08:21:39] NOTICE: Finishing ...
[29-Jul-2013 08:21:39] NOTICE: exiting, bye-bye!
[29-Jul-2013 08:21:39] NOTICE: fpm is running, pid 24474
[29-Jul-2013 08:21:39] NOTICE: ready to handle connections
/var/log/php5-fpm.log - this one seems to be okay
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 186
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready