Use socket between php-cgi and nginx fastcgi_pass

master
櫻川 浅羽 5 years ago
parent 012ef4bfd3
commit 6651d61f34

@ -24,7 +24,7 @@ server {
location ~ \.php$ {
include fastcgi_params;
fastcgi_index index.php;
fastcgi_pass 127.0.0.1:9000;
fastcgi_pass unix:/dev/shm/php-cgi.sock;
fastcgi_buffer_size 128k;
fastcgi_buffers 4 256k;
fastcgi_busy_buffers_size 256k;

@ -161,7 +161,7 @@ group = www-data
; (IPv6 and IPv4-mapped) on a specific port;
; '/path/to/unix/socket' - to listen on a unix socket.
; Note: This value is mandatory.
listen = 127.0.0.1:9000
listen = /dev/shm/php-cgi.sock
; Set listen(2) backlog.
; Default Value: 65535 (-1 on FreeBSD and OpenBSD)
@ -172,9 +172,9 @@ listen = 127.0.0.1:9000
; BSD-derived systems allow connections regardless of permissions.
; Default Values: user and group are set as the running user
; mode is set to 0660
;listen.owner = nginx
;listen.group = www-data
;listen.mode = 0660
listen.owner = nginx
listen.group = www-data
listen.mode = 0660
; When POSIX Access Control Lists are supported you can set them using
; these options, value is a comma separated list of user/group names.
; When set, listen.owner and listen.group are ignored

Loading…
Cancel
Save