/home/website.com/config/production/nginx/conf.d/default.conf
server {
listen 80;
listen [::]:80;
root /home/website.com;
index index.php index.html;
server_name website.com;
location / {
try_files $uri $uri/ =404;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
}
location ~ /\.ht {
deny all;
}
}
/home/website.com/config/production/nginx/conf.d/default.conf
/home/ЛЮБОЙ.САЙТ/config/production/nginx/conf.d/default.conf
connect() to unix:/run/php/php7.3-fpm.sock failed (2: No such file or directory) while connecting to upstream, client: 1.2.3.4, server: test.site, request: "GET /index3.php HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.3-fpm.sock:", host: "test.site"
service php7.3-fpm restart
:root@debian10x64:~# ls -l /run/php/
total 4
-rw-r--r-- 1 root root 5 Dec 25 17:12 php7.3-fpm.pid
srw-rw---- 1 www-data www-data 0 Dec 25 17:12 php7.3-fpm.sock
www.conf
содержит всё вроде верноеlisten = /run/php/php7.3-fpm.sock
listen.owner = www-data
listen.group = www-data
server {
listen 80;
listen [::]:80;
root /home/test.site;
index index.php index.html;
server_name test.site;
location / {
try_files $uri $uri/ =404;
}
location ~ \.php$ {
include fastcgi_params;
fastcgi_pass unix:/run/php/php7.3-fpm.sock;
}
location ~ /\.ht {
deny all;
}
}
service php7.3-fpm status
● php7.3-fpm.service - The PHP 7.3 FastCGI Process Manager
Loaded: loaded (/lib/systemd/system/php7.3-fpm.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2019-12-25 17:12:16 MSK; 6min ago
Docs: man:php-fpm7.3(8)
Main PID: 12536 (php-fpm7.3)
Status: "Processes active: 0, idle: 2, Requests: 0, slow: 0, Traffic: 0req/sec"
Tasks: 3 (limit: 2312)
Memory: 14.6M
CGroup: /system.slice/php7.3-fpm.service
├─12536 php-fpm: master process (/etc/php/7.3/fpm/php-fpm.conf)
├─12538 php-fpm: pool www
└─12539 php-fpm: pool www
Dec 25 17:12:16 debian10x64.local systemd[1]: php7.3-fpm.service: Succeeded.
Dec 25 17:12:16 debian10x64.local systemd[1]: Stopped The PHP 7.3 FastCGI Process Manager.
Dec 25 17:12:16 debian10x64.local systemd[1]: Starting The PHP 7.3 FastCGI Process Manager...
Dec 25 17:12:16 debian10x64.local systemd[1]: Started The PHP 7.3 FastCGI Process Manager.
[25-Dec-2019 17:30:16] ERROR: [pool www] cannot get uid for user 'nginx': Success (0)
[25-Dec-2019 17:30:16] ERROR: FPM initialization failed
/run/php/php7.3-fpm.sock
Nginx ищет в своём контейнере, а не на сервере./home
, поэтому если Вы перенесете туда, должно работать.ln -s /run/php/php7.3-fpm.sock /home/php7.3-fpm.sock
/home/php7.3-fpm.sock
/run/php/php7.3-fpm.sock
Nginx ищет в своём контейнере, а не на сервере./home
, поэтому если Вы перенесете туда, должно работать.ln -s /run/php/php7.3-fpm.sock /home/php7.3-fpm.sock
/home/php7.3-fpm.sock
2019/12/25 17:28:59 [crit] 9175#9175: *425 connect() to unix:/home/test.site/php7.3-fpm.sock failed (13: Permission denied) while connecting to upstream, client: 1.2.3.4, server: test.site, request: "GET /index3.php HTTP/1.1", upstream: "fastcgi://unix:/home/test.site/php7.3-fpm.sock:", host: "test.site"
listen = /home/test.site/php7.3-fpm.sock
listen.owner = nginx
listen.group = nginx
listen.mode = 0660
sudo useradd -r -s /bin/false nginx
usermod -aG sudo nginx
www-data
добавитьusermod -aG www-data nginx
docker run -d --name php --restart always --network cinemapress -v /home:/home php:fpm-alpine
fastcgi_pass php:9000;
location ~* \.php$ {
try_files $uri $uri/ /index.php last;
fastcgi_split_path_info (.+?\.php)(/.*)$;
fastcgi_pass php:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
}
docker run -d --name php --restart always --network cinemapress -v /home:/home php:fpm-alpine
fastcgi_pass php:9000;
location ~* \.php$ {
try_files $uri $uri/ /index.php last;
fastcgi_split_path_info (.+?\.php)(/.*)$;
fastcgi_pass php:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
}
docker run -d --name some-mysql -e MYSQL_ROOT_PASSWORD=my-secret-pw --restart always --network cinemapress -v /home:/home mysql:latest -p 3319:3319
2019-12-25T22:53:33.935197301Z 2019-12-25 22:53:33+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.18-1debian9 started.
2019-12-25T22:53:33.984373717Z 2019-12-25 22:53:33+00:00 [ERROR] [Entrypoint]: mysqld failed while attempting to check config
2019-12-25T22:53:33.984400232Z command was: mysqld -p 3319:3319 --verbose --help
2019-12-25T22:53:33.984405450Z Enter password: mysqld: Can not perform keyring migration : Invalid --keyring-migration-source option.
2019-12-25T22:53:33.984410115Z 2019-12-25T22:53:33.971346Z 0 [ERROR] [MY-011084] [Server] Keyring migration failed.
2019-12-25T22:53:33.985871942Z 2019-12-25T22:53:33.976242Z 0 [ERROR] [MY-010119] [Server] Aborting
docker run -d --name my-ysql-cntr -p 42000:3306 -e MYSQL_ROOT_PASSWORD=ВАШ_ПАРОЛЬ --restart always --network cinemapress -v /home:/home mysql:latest
docker run \
-d \
--name mysql \
-e MYSQL_ROOT_PASSWORD="ВАШ_ПАРОЛЬ" \
--restart always \
--network cinemapress \
-v /var/lib/mysql:/var/lib/mysql \
mysql:latest
docker run \
-d \
--name mysql \
-e MYSQL_ROOT_PASSWORD="ВАШ_ПАРОЛЬ" \
--restart always \
--network cinemapress \
-v /var/lib/mysql:/var/lib/mysql \
mysql:latest