Почему не работает (nginx+php8.3-fpm)ERR_CONNECTION_REFUSED [закрыто]Php

Кемеровские программисты php общаются здесь
Ответить
Anonymous
 Почему не работает (nginx+php8.3-fpm)ERR_CONNECTION_REFUSED [закрыто]

Сообщение Anonymous »

Помогите мне понять, что я делаю не так
nginx.conf
`events {
worker_connections 768;
# multi_accept on;
}

http {

##
# Basic Settings
##

sendfile on;
tcp_nopush on;
types_hash_max_size 2048;
# server_tokens off;

# server_names_hash_bucket_size 64;
# server_name_in_redirect off;

include /etc/nginx/mime.types;
default_type application/octet-stream;

##
# SSL Settings
##

ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; # Dropping SSLv3, ref: POODLE
ssl_prefer_server_ciphers on;

##
# Logging Settings
##
error_log /var/log/nginx/error.log;
access_log /var/log/nginx/access.log;

##
# Gzip Settings
##

gzip on;

# gzip_vary on;
# gzip_proxied any;
# gzip_comp_level 6;
# gzip_buffers 16 8k;
# gzip_http_version 1.1;
# gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;

##
# Virtual Host Configs
##

include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
}

#mail {
# # See sample authentication script at:
# # http://wiki.nginx.org/ImapAuthenticateW ... ePhpScript
#
# # auth_http localhost/auth.php;
# # pop3_capabilities "TOP" "USER";
# # imap_capabilities "IMAP4rev1" "UIDPLUS";
#
# server {
# listen localhost:110;
# protocol pop3;
# proxy on;
# }
#
# server {
# listen localhost:143;
# protocol imap;
# proxy on;
# }
#}
`

conf.d
server {
if ($host = www.example.com) {
return 301 https://$host$request_uri;
} # managed by Certbot

if ($host = example.com) {
return 301 https://$host$request_uri;
} # managed by Certbot

listen 192.168.100.6:80;
server_name example.com www.example.com;
return 301 https://example.com$request_uri;

}

server {
listen 192.168.100.6:443 ssl;
server_name example.com www.example.com;
root /home/mysite/public_html/mysite/web;
index index.php
error_log log/error.log;

location / {
try_files $uri $uri/ @rules;
}

location @rules {
rewrite ^/([a-z]*)$ /index.php?action=$1;
rewrite ^/([a-z]*)/(.*)$ /index.php?action=$1&item=$2;
}

# location /index.php {
# fastcgi_pass 127.0.0.1:9000;
# include fastcgi_params;
# fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
# }

location ~ \.php$ {

fastcgi_pass 127.0.0.1:9000;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}

charset UTF-8;
ssl_certificate /etc/letsencrypt/live/mysite.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/mysite.com/privkey.pem; # managed by Certbot
}


Server Ubuntu
systemctl status nginx
● nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/usr/lib/systemd/system/nginx.service; enabled; preset: enabled)
Active: active (running) since Sat 2024-07-27 10:35:27 UTC; 3h 0min ago
Docs: man:nginx(8)
Process: 821 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
Process: 917 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
Process: 2958 ExecReload=/usr/sbin/nginx -g daemon on; master_process on; -s reload (code=exited, status=0/SUCCESS)
Main PID: 919 (nginx)
Tasks: 3 (limit: 9387)
Memory: 59.2M (peak: 61.9M)
CPU: 87ms
CGroup: /system.slice/nginx.service
├─ 919 "nginx: master process /usr/sbin/nginx -g daemon on; master_process on;"
├─2960 "nginx: worker process"
└─2961 "nginx: worker process"

service php8.3-fpm status
● php8.3-fpm.service - The PHP 8.3 FastCGI Process Manager
Loaded: loaded (/usr/lib/systemd/system/php8.3-fpm.service; enabled; preset: enabled)
Active: active (running) since Sat 2024-07-27 10:35:31 UTC; 3h 1min ago
Docs: man:php-fpm8.3(8)
Process: 964 ExecStartPost=/usr/lib/php/php-fpm-socket-helper install /run/php/php-fpm.sock /etc/php/8.3/fpm/pool.d/www.conf 83 (code=exited, status=0/SUCCESS)
Main PID: 822 (php-fpm8.3)
Status: "Processes active: 0, idle: 2, Requests: 0, slow: 0, Traffic: 0req/sec"
Tasks: 3 (limit: 9387)
Memory: 16.2M (peak: 16.9M)
CPU: 473ms
CGroup: /system.slice/php8.3-fpm.service
├─822 "php-fpm: master process (/etc/php/8.3/fpm/php-fpm.conf)"
├─962 "php-fpm: pool www"
└─963 "php-fpm: pool www"


Подробнее здесь: https://stackoverflow.com/questions/788 ... on-refused
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

Вернуться в «Php»