[ad_1]
I have project which uses nginx
and php-fpm
container.
In docker-compose
, I can use this nginx setting fastcgi_pass php:9000;
(php
is container name of php-fpm
)
in nginx.conf
server {
listen 80;
server_name xxx.cinnamon.is;
index index.php index.html index.htm;
root /var/www/public;
client_max_body_size 200M; # 413 Request Entity Too Large
location / {
index index.php index.html index.htm;
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass php:9000;
#fastcgi_pass 0.0.0.0:9000;
#fastcgi_pass unix:/var/run/php-fpm.sock;
#fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
}
}
However now I want to use set(nginx
, php-fpm
in ECS
.
In Ecs
there is not container name.
And php-fpm
container accept only
netstat -an|grep LISTEN
tcp6 0 0 :::9000 :::* LISTEN
Now, I tried few patterns in nginx.conf
fastcgi_pass php:9000;
#fastcgi_pass 0.0.0.0:9000;
#fastcgi_pass unix:/var/run/php-fpm.sock;
#fastcgi_pass 127.0.0.1:9000;
but either one doesn’t work.
How can I set?
[ad_2]