'Install OroCommerce 5.0 community error 500 Internal Server Error

I have a problem with nginx config when start server nginx: This is my site upload to host

my nginx config in etc/nginx/nginx.conf,I try to use phpinfo() into index.php but wesite no load file

user nginx;
worker_processes auto;

error_log /var/log/nginx/error.log;
pid /run/nginx.pid;

# Load dynamic modules. See /usr/share/doc/nginx/README.dynamic.
include /usr/share/nginx/modules/*.conf;

events {
    worker_connections 1024;
}

http {
    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';
    
access_log  /var/log/nginx/access.log  main;

sendfile            on;
tcp_nopush          on;
tcp_nodelay         on;
keepalive_timeout   65;
types_hash_max_size 2048;

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

# Load modular configuration files from the /etc/nginx/conf.d directory.
# See http://nginx.org/en/docs/ngx_core_module.html#include
# for more information.
include /etc/nginx/conf.d/*.conf;

server {
    listen       80 default_server;
    listen       [::]:80 default_server;
    server_name  _;
    root         /usr/share/nginx/html;
    # Load configuration files for the default server block.
    include /etc/nginx/default.d/*.conf;

    location / {
    index index.php index.html index.htm;
        try_files $uri $uri/ =404;
    }

    error_page 404 /404.html;
        location = /40x.html {
    }

    error_page 500 502 503 504 /50x.html;
        location = /50x.html {
    }
}

my error log:

2022/02/21 20:21:58 [error] 3174791#0: *949 FastCGI sent in stderr: "PHP message: PHP Warning:  SessionHandler::read(): open(/home/oro/m8_drabiz_net/var/sessions/prod/sess_bo0sa6se0tci46iu7coqui0r6q, O_RDWR) failed: Permission denied (13) in /home/oro/m8_drabiz_net/vendor/symfony/http-foundation/Session/Storage/Handler/StrictSessionHandler.php on line 49PHP message: PHP Warning:  session_start(): Failed to read session data: user (path: /home/oro/m8_drabiz_net/var/sessions/prod) in /home/oro/m8_drabiz_net/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php on line 149" while reading response header from upstream, client: 123.20.125.185, server: m8.drabiz.net, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php-fpm/www.sock:", host: "m8.drabiz.net"

when I use command: sudo nginx -t everything ok but the server always error 500.

nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful


Solution 1:[1]

I think it has to do with the permission of the user in /home/oro/m8_drabiz_net/var/sessions/prod. I'd start by checking permissions on the user and try our giving executable permissions to the user

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1