我试图在运行NGINX&amp ;;的AWS EC2服务器上安装Magento。 HHVM。
我在浏览器中打开Magento时出现502网关错误。在我的/var/log/nginx/error.log中我有这个错误:
2015/06/19 13:40:34 [crit] 1976#0: *4 connect() to unix:/var/run/php5-fpm.sock failed (2: No such file or directory) while connecting to upstream, client: 62.77.173.61, server: qa.magento.dev, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "qa.magento.dev"
据此我认为NGINX正在寻找php5-fpm而不是HHVM。知道如何解决这个问题吗?
答案 0 :(得分:0)
我能够通过使用
更新我的nginx配置文件来解决这个问题# Handle the exectution of .php files.
location ~ .php$ {
if (!-e $request_filename) {
rewrite / /index.php last;
}
expires off;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
try_files $uri $uri/ @handler;
# fastcgi_pass unix:/var/run/php5-fpm.sock;
#fastcgi_param HTTPS $fastcgi_https;
# fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param MAGE_RUN_CODE default;
fastcgi_param MAGE_RUN_TYPE store;
include fastcgi_params;
}