Quantcast
Channel: Nginx Forum - Nginx Mailing List - Russian
Viewing all articles
Browse latest Browse all 3102

Отдельный PHP-FPM сервер (14 replies)

$
0
0
Всем привет!

Целый день пытаюсь заставить работать NGINX с удаленным PHP-FPM сервером
Не получается, никак, хоть башкой об стенку бейся

Есть два сервера, сервер "А" и сервер "Б"
На сервере "А" ведется разработка на PHP, и там же расположен NGINX
На сервере "Б" находится база данных и бекенд PHP-FPM

Конфигурация NGINX сервера "А":
http {
upstream php {
server 10.0.0.10:9000;
}

server {
listen 80;
server_name example.com;
root /var/www/test/web;
index index.php;
server_tokens off;

location / {
try_files $uri /index.php?$args;
}

location ~ \.php$ {
fastcgi_pass php;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}

error_log /var/log/nginx/example.com.error_log info;
access_log /var/log/nginx/example.com.access_log;
}

IP адрес сервера "А" 10.0.0.5


Конфигурация PHP-FPM сервера "Б":
[www]
user = www-data
group = www-data
listen = 9000
listen.allowed_clients = 10.0.0.5
pm = dynamic
pm.max_children = 10
pm.start_servers = 2
pm.min_spare_servers = 1
pm.max_spare_servers = 3
pm.max_requests = 200
access.log = /tmp/access.log

IP адрес сервера "Б" 10.0.0.10

Когда захожу по адресу http://example.com получаю
"File not found. "

В логах сервера "А" следующее:
2013/11/13 02:07:20 [error] 8032#0: *120 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 10.0.1.100, server: example.com, request: "GET / HTTP/1.1", upstream: "fastcgi://10.0.0.10:9000", host: "perhyar.liteproject.ru"

10.0.1.100 - - [13/Nov/2013:02:07:20 +0600] "GET / HTTP/1.1" 404 47 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:24.0) Gecko/20100101 Firefox/24.0"


В логах сервера "Б":
10.0.0.5 - 12/Nov/2013:15:07:20 -0500 "GET /index.php" 404 - 0.827 256 0.00%


Господа, что я делаю не так??
Заранее спасибо!

Viewing all articles
Browse latest Browse all 3102

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>