【发布时间】:2019-11-16 05:50:02
【问题描述】:
我尝试检查和阅读有关此错误的文章,但直到现在我无法解决此问题。我使用 Cloudflare 来保护我的网站。如何修复错误 502 Bad Gateway
我的网站目前在 Digital Ocean 上运行(PHP7.2 - Codeigniter 3、MySQL 和 Nginx),我最近升级了我的服务器,因为我认为这可能是由于我的网站流量。我以前用 5 美元的 droplet,现在我用 15 美元(2 个 vCPU 和 2GB 内存)。
Nginx 错误日志:https://pastebin.com/XjGGjNPL
这是配置:
server {
listen 80;
root /var/www/<site_dir>;
index index.php index.html index.htm index.nginx-debian.html;
server_name <domain>;
#location ~* \.(ico|css|js|gif|jpe?g|png)(\?[0-9]+)?$ {
# expires max;
# log_not_found off;
#}
location / {
try_files $uri $uri/ /index.php;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
}
location ~ /\.ht {
deny all;
}
# Deny for accessing codes
location ~ ^/(application|system|tests)/ {
return 403;
}
}
server {
listen 80 default_server;
server_name _;
return 404;
}
我使用 htop 检查了我的资源
对此有什么建议吗?
【问题讨论】:
标签: php mysql nginx codeigniter-3 bad-gateway