Je vous écris concernant l'installation de php-fpm sur mon NAS qui n'est pas fonctionnelle à ce jour. Situons un peu plus le contexte avant de commencer.
J'ai donc mis en place un frontal via Nginx qui dessert très bien mes fichiers jusqu'à présent statiques. Avec la fin de la configuration de mon propre serveur mail, je me suis dis que ça pouvait être pas mal d'ajouter un formulaire de contact afin d'être contacté pour X raisons.
J'utilise aussi Nginx pour déployer un cgit afin d'avoir un visuel de l'état de mes repos distants.
Passons au fichiers de conf : Nginx.
Code : Tout sélectionner
user web;
worker_processes 2;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
keepalive_timeout 65;
gzip on;
server {
listen 80;
root /home/web/nginx/html/splab;
index index.php index.html index.htm;
server_name splab.io;
location / {
try_files $uri $uri/ /index.html;
}
location /blog/ {
try_files $uri $uri/ /blog.html;
}
location /blog/*/ {
try_files $uri $uri/ /articles/*.html;
}
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /home/web/nginx/html/splab;
}
# pass the PHP scripts to FastCGI server listening on the php-fpm socket
location ~ \.php$ {
fastcgi_pass unix:/tmp/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}
set $cgit_path "/usr/share/nginx/html/cginx/cgit";
# Serve static cgit files
location ~* ^/cgit\.(css|png|ico)$ {
root $cgit_path;
expires 30d;
}
location /git.repositories/ {
root $cgit_path;
fastcgi_split_path_info ^(/git.repositories)(.*)$;
fastcgi_param SCRIPT_FILENAME $cgit_path/cgit.cgi;
fastcgi_param CGIT_CONFIG $cgit_path/cgitrc;
include fastcgi_params;
fastcgi_param DOCUMENT_ROOT $cgit_path;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_pass 127.0.0.1:8081;
fastcgi_intercept_errors off;
}
}
}
Code : Tout sélectionner
open_basedir = /srv/http/:/home/:/tmp/:/usr/share/pear/:/usr/share/webapps/:/home/web/nginx/html/splab/ # J'ai ajouté le chemin vers mes sources.
Code : Tout sélectionner
user = web # Correspond au même user que Nginx !
group = web # Pareil !
listen = /tmp/php5-fpm.sock
listen.owner = web
listen.group = web
listen.mode = 0660
Je trouve un truc néanmoins très louche : la socket /tmp/php5-fpm.sock n'existe pas ! En effet, un petit tour dans le journal...
Code : Tout sélectionner
juin 26 01:40:26 smtp.splab.io nginx[12222]: 2015/06/26 01:40:26 [crit] 12224#0: *1 connect() to unix:/tmp/php5-fpm.sock failed (2: No such file or directory) while connecting to upstream, client: 213.245.89.120, server: splab.io, request: "GET /mail/test.php HTTP/1.1", upstream: "fastcgi://unix:/tmp/php5-fpm.sock:", host: "splab.io"
Code : Tout sélectionner
drwxrwxrwt 9 root root 220 26 juin 01:27 .
Autre chose : première utilisation de php-fpm et j'ai pas de background par rapport à son utilisation. Si c'est de la merde, je veux bien que vous me redirigiez

Merci pour vos futures lanternes.
A dispositions pour vous donner plus d'informations si je n'est pas été clair.