nginx php-fpm

master
bulw 7 years ago
parent b38d8e5394
commit bee7d1cba5

@ -23,8 +23,6 @@ services:
hostname: demo_php-fpm hostname: demo_php-fpm
container_name: demo_php-fpm container_name: demo_php-fpm
build: ./php build: ./php
ports:
- "9000:9000"
volumes: volumes:
- ./php/etc:/usr/local/etc - ./php/etc:/usr/local/etc
- ./wwwroot:/var/www/html:rw - ./wwwroot:/var/www/html:rw

@ -2,6 +2,8 @@ server {
listen 80; listen 80;
server_name localhost; server_name localhost;
root /var/www/html;
#charset koi8-r; #charset koi8-r;
#access_log /var/log/nginx/host.access.log main; #access_log /var/log/nginx/host.access.log main;
@ -28,8 +30,8 @@ server {
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
# #
location ~ \.php { location ~ \.php {
#fastcgi_pass 127.0.0.1:9000; fastcgi_pass php-fpm:9000;
fastcgi_pass unix:/sock/php-cgi.sock; #fastcgi_pass unix:/sock/php-cgi.sock;
fastcgi_index index.php; fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params; include fastcgi_params;

Loading…
Cancel
Save