[英]Install OroCommerce 5.0 community error 500 Internal Server Error
啟動服務器 nginx 時,我的 nginx 配置有問題:這是我上傳到主機的網站
我在 etc/nginx/nginx.conf 中的 nginx 配置,我嘗試在 index.php 中使用 phpinfo() 但網站沒有加載文件
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 {
}
}
我的錯誤日志:
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"
當我使用命令時:sudo nginx -t 一切正常,但服務器總是錯誤 500。
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
我認為這與/home/oro/m8_drabiz.net/var/sessions/prod
中的用戶許可有關。 我首先檢查用戶的權限,然后嘗試向用戶授予可執行權限
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.