![nginx hhvm 网关错误](https://linux22.com/image/648481/nginx%20hhvm%20%E7%BD%91%E5%85%B3%E9%94%99%E8%AF%AF.png)
我确实遇到了 Nginx 1.6.2(已编译)和 HHVM 3.4.2 的问题。一切安装都“正常”,运行时hhvm info.php
返回“HipHop”。但当我访问网站时,出现 502 错误网关,因此 HHVM 运行正常,肯定是 nginx 和/或 php5-fpm 的问题。
netstat -an | grep LISTEN
tcp 0 0 127.0.0.1:9000 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN
hhvm配置文件
location ~ \.(hh|php)$ {
fastcgi_keep_conn on;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
站点1.conf
server {
server_name example.com www.example.com;
include /etc/nginx/hhvm.conf;
listen 80; ## listen for ipv4; this line is default and implied
root /opt/sites/www/site1;
index index.php index.html index.htm;
}
我现在已经在这里被困好几天了。