Dernier message de la page précédente :
Php fmp communique par un socket Unix.Donc quand tu tapes localhost nginx pointe sur ton chemin ? Tu as donc configuré les blocks server. Ou bien c'est nginx qui pointe dans var/www et welcome ?
Dernier message de la page précédente :
Php fmp communique par un socket Unix.c'est php-fmp ou php-fpmmpedro a écrit :Php fmp communique par un socket Unix.
oui, c'est bien celampedro a écrit :Donc quand tu tapes localhost nginx pointe sur ton chemin ?
j'ai modifié le chemin dans le fichier /etc/nginx/sites-available/defautmpedro a écrit :Tu as donc configuré les blocks server.
je n'ai rien trouvé a ce sujetmpedro a écrit : Si tu veux gagner du temps fais une recherche car c'est est une ligne à ajouter ou decommenter (c est selon) dans PHP7 pool.d et c'est le www conf
Code : Tout sélectionner
cinnamon ~ # systemctl start php-fpm
Failed to start php-fmp.service: Unit php-fmp.service not found.
je n'ai pas du l'ajouté, elle s'y trouvé déjàmpedro a écrit :Il faut ajouter cette ligne : listen = /run/php/php7.0-fpm.sock au fichier http://www.conf" onclick="window.open(this.href);return false;
Code : Tout sélectionner
alain@cinnamon ~ $ service php7.0-fpm status
● php7.0-fpm.service - The PHP 7.0 FastCGI Process Manager
Loaded: loaded (/lib/systemd/system/php7.0-fpm.service; enabled; vendor prese
Active: active (running) since lun 2018-02-12 23:06:52 CET; 13s ago
Process: 17254 ExecStartPre=/usr/lib/php/php7.0-fpm-checkconf (code=exited, st
Main PID: 17263 (php-fpm7.0)
Status: "Processes active: 0, idle: 2, Requests: 0, slow: 0, Traffic: 0req/se
CGroup: /system.slice/php7.0-fpm.service
├─17263 php-fpm: master process (/etc/php/7.0/fpm/php-fpm.conf)
├─17265 php-fpm: pool www
└─17266 php-fpm: pool www
fév 12 23:06:52 cinnamon systemd[1]: Starting The PHP 7.0 FastCGI Process Manage
fév 12 23:06:52 cinnamon systemd[1]: Started The PHP 7.0 FastCGI Process Manager
lines 1-13/13 (END)
Code : Tout sélectionner
alain@cinnamon ~ $ systemctl status nginx.service
● nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: en
Active: active (running) since lun 2018-02-12 15:26:15 CET; 7h ago
Process: 17489 ExecReload=/usr/sbin/nginx -g daemon on; master_process on; -s
Main PID: 1168 (nginx)
CGroup: /system.slice/nginx.service
├─ 1168 nginx: master process /usr/sbin/nginx -g daemon on; master_pr
├─17491 nginx: worker process
├─17492 nginx: worker process
├─17493 nginx: worker process
└─17494 nginx: worker process
fév 12 15:26:11 cinnamon systemd[1]: Starting A high performance web server and
fév 12 15:26:15 cinnamon systemd[1]: Started A high performance web server and a
fév 12 16:58:58 cinnamon systemd[1]: Started A high performance web server and a
fév 12 23:15:53 cinnamon systemd[1]: Reloading A high performance web server and
fév 12 23:15:53 cinnamon systemd[1]: Reloaded A high performance web server and
lines 1-17/17 (END)
Code : Tout sélectionner
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
Code : Tout sélectionner
server_name _;
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ =404;
}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
# location ~ \.php$ {
# include snippets/fastcgi-php.conf;
#
# # With php7.0-cgi alone:
# fastcgi_pass 127.0.0.1:9000;
# # With php7.0-fpm:
# fastcgi_pass unix:/run/php/php7.0-fpm.sock;
#}
Code : Tout sélectionner
server_name _;
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ =404;
}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ \.php$ {
# include snippets/fastcgi-php.conf;
#
# # With php7.0-cgi alone:
# fastcgi_pass 127.0.0.1:9000;
# # With php7.0-fpm:
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
}
Code : Tout sélectionner
##
# You should look at the following URL's in order to grasp a solid understanding
# of Nginx configuration files in order to fully unleash the power of Nginx.
# http://wiki.nginx.org/Pitfalls
# http://wiki.nginx.org/QuickStart
# http://wiki.nginx.org/Configuration
#
# Generally, you will want to move this file somewhere, and start with a clean
# file but keep this around for reference. Or just disable in sites-enabled.
#
# Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples.
##
# Default server configuration
#
server {
listen 80 default_server;
listen [::]:80 default_server;
# SSL configuration
#
# listen 443 ssl default_server;
# listen [::]:443 ssl default_server;
#
# Note: You should disable gzip for SSL traffic.
# See: https://bugs.debian.org/773332
#
# Read up on ssl_ciphers to ensure a secure configuration.
# See: https://bugs.debian.org/765782
#
# Self signed certs generated by the ssl-cert package
# Don't use them in a production server!
#
# include snippets/snakeoil.conf;
root /home/alain/Documents/www;
# Add index.php to the list if you are using PHP
index index.html index.htm index.nginx-debian.html index.php;
server_name _;
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ =404;
}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ \.php$ {
# include snippets/fastcgi-php.conf;
#
# # With php7.0-cgi alone:
# fastcgi_pass 127.0.0.1:9000;
# # With php7.0-fpm:
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}
# Virtual Host configuration for example.com
#
# You can move that to a different file under sites-available/ and symlink that
# to sites-enabled/ to enable it.
#
#server {
# listen 80;
# listen [::]:80;
#
# server_name example.com;
#
# root /var/www/example.com;
# index index.html;
#
# location / {
# try_files $uri $uri/ =404;
# }
#}
Code : Tout sélectionner
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
Code : Tout sélectionner
location / {
Code : Tout sélectionner
location ~ \.php$ {
Code : Tout sélectionner
# monsiteweb
server {
listen 80;
listen [::]:80;
root /home/alain/Documents/www/monsiteweb;
# dans ~Documents/www/ il existe donc un dossier nommé monsiteweb
# Add index.php to the list if you are using PHP
index index.php index.html;
server_name monsiteweb.lan;
location / {
try_files $uri $uri/ @handler =404;
}
# REDIRECTIONS
#
# Flux RSS
location /feed/ {
rewrite /feed\/(.*)$ /feed.php?$1 last;
}
# Sitemap
location = /sitemap.xml {
rewrite .* /sitemap.php;
}
# PROTECTION REPERTOIRES
location /data/configuration { deny all; }
location /version { deny all; }
location /update { deny all; }
location /readme { deny all; }
# Réécriture vers l'index
location @handler {
rewrite /(.*)$ /index.php?$1 last;
}
# pass PHP scripts to FastCGI server
location ~ \.php$ {
include snippets/fastcgi-php.conf;
# # With php-fpm (or other unix sockets):
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
}
}
Code : Tout sélectionner
127.0.0.1 localhost monsiteweb.lan
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters