在安装Contenta CMS(以下详细信息)之后,应该加载Contenta安装页面的/web/index.php文件返回了“ 502错误请求”。我遵循了所有可以找到的故障排除建议(也记录在下面),但是无法清除错误。
LINUX
发行人ID:Ubuntu 说明:Ubuntu 18.04.2 LTS 发行:18.04 代号:bionic
NGINX
nginx版本:nginx / 1.14.0(Ubuntu)
MYSQL
适用于Linux(x86_64)的MySQL版本14.14 Distrib 5.7.25,使用EditLine包装器
PHP
PHP 7.2.15-0ubuntu0.18.04.2
php-mbstring
php-gd
php-curl
安装Contenta CMS
php -r“ readfile('https://raw.githubusercontent.com/contentacms/contenta_jsonapi_project/8.x-2.x/scripts/download.sh');” > download-contentacms.sh
chmod a + x download-contentacms.sh
./ download-contentacms.sh / usr / share / nginx / public_html / contenta
.env
SITE_MAIL=admin@site.com
ACCOUNT_MAIL=admin@site.com
SITE_NAME ='Contenta CMS'
ACCOUNT_NAME =管理员
MYSQL_DATABASE = contenta
MYSQL_HOSTNAME =本地主机
MYSQL_PORT = 3306
MYSQL_USER = root @ localhost
.env.local
MYSQL_PASSWORD = ********
ACCOUNT_PASS = *****
composer run-script install:with-mysql
chmod -R 777 / var / lib / php / sessions
/etc/php/7.2/cli/php.ini
cgi.fix_pathinfo = 0;
nginx.conf
user www-data;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;
events {
worker_connections 30;
}
http {
server{
listen 80;
server_name server-ip-address;
add_header X-Robots-Tag "noindex, nofollow, nosnippet, noarchive";
# root /usr/share/nginx/public_html/conenetacms/web;
# index index.php;
root /usr/share/nginx/public_html/conenetacms/;
location /web {
index index.php;
}
location ~ \.php$ {
error_page 418 = @rewrite;
recursive_error_pages on;
fastcgi_split_path_info ^[^=](.+.php)(/.+)$;
include fastcgi_params;
if ( $uri = /index.php ) {
break;
}
if ( !-e $document_root$fastcgi_script_name) {
return 418;
}
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_intercept_errors on;
fastcgi_read_timeout 240;
fastcgi_pass 127.0.0.1:9000;
}
}
}