Bonjour à tous,
J’ai un petit problème avec nginx + php-fpm pour afficher ma page php de wordpress. Il ne s’affiche juste rien, sauf les pages html.
Voici mon fichier de conf :
server {
listen 80;
server_name www.resyst-it.fr;
root /var/www/resyst-it.fr;
index index.php index.htm;
access_log /var/log/nginx/www.resyst-it.fr.access.log;
error_log /var/log/nginx/www.resyst-it.fr.error.log;
location /var/www/resyst-it.fr {
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
# location ~ [^/]\.php(/|$) {
# fastcgi_split_path_info ^(.+?\.php)(/.*)$;
# if (!-f $document_root$fastcgi_script_name) {
# return 404;
# }
try_files $uri =404;
fastcgi_index index.php;
fastcgi_pass unix:/var/run/php5-fpm.sock;
#fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
Mon fichier nginx.conf
user www-data;
worker_processes 2;
pid /run/nginx.pid;
events {
worker_connections 32768;
multi_accept on;
use epoll;
}
http {
##
# Basic Settings
##
sendfile on;
tcp_nopush on;
tcp_nodelay on;
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;
set_real_ip_from 127.0.0.1;
real_ip_header X-Forwarded-For;
##
# Timeout
##
client_body_buffer_size 1K;
client_header_buffer_size 1K;
client_max_body_size 1K;
large_client_header_buffers 2 1K;
client_body_timeout 10;
client_header_timeout 10;
keepalive_timeout 5 5;
send_timeout 10;
##
# Logging Settings
##
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
log_format main '$remote_addr - $remote_user [$time_local] $status ' '"$request" $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"';
##
# Gzip Settings
##
gzip on;
gzip_disable "msie6";
gzip_comp_level 2;
gzip_min_length 1000;
gzip_proxied expired no-cache no-store private auth;
gzip_vary on;
# gzip_buffers 16 8k;
# gzip_http_version 1.1;
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
##
# Virtual Host Configs
##
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
}
Et dans mes logs j’ai ça :
2014/12/03 00:10:05 [error] 3016#0: *3 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 83.157.179.80, server: www.resyst-it.fr, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "www.resyst-it.fr"
2014/12/03 00:10:19 [error] 3835#0: *1 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 83.157.179.80, server: www.resyst-it.fr, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "www.resyst-it.fr"
2014/12/03 00:16:04 [error] 4033#0: *1 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 212.195.244.36, server: www.resyst-it.fr, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "37.140.225.31"
Je vous remercie pour votre aide.