我有nginx和hhvm作为ubuntu虚拟机上的进程安装并运行。配置复制如下。我在/ usr /股的index.php文件/ nginx的/ HTML(nginx的指向),但是当我试图访问nginx的服务的网站beign,我得到HHVM以下错误:无法让hhvm与nginx一起工作
/VAR /log/nginx/error.log
2016/10/04 12:03:05 [crit] 12443#0: *1 connect() to unix:/var/run/hhvm/hhvm.sock failed (2: No such file or directory) while connecting to upstr
eam, client: xx.xxx.xxx.xxx, server: , request: "GET/HTTP/1.1", upstream: "fastcgi://unix:/var/run/hhvm/hhvm.sock:", host: "xx.xx.xx.xx"
Nginx的配置(配置的一部分)
server {
listen 80 default_server;
root /usr/share/nginx/html;
index index.php index.html index.htm;
location/{
index index.php;
try_files $uri $uri/ $uri/index.php$args /index.php$args;
}
location /mysql {
index index.php;
}
location ~* \.(php)$ {
try_files $uri = 404;
location ~ \..*/.*\.php$ {return 404;}
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_keep_conn on;
fastcgi_pass unix:/var/run/hhvm/hhvm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
我已经检查 - bothh nginx的和HHVM进程正在运行。有关如何排除此问题的任何想法?
更新: 我改变了server.ini文件/ etc/HHVM以下内容并重新启动该服务,但它似乎并没有做的工作
hhvm.server.file.socket=/var/run/hhvm/hhvm.sock
我注释掉9000端口是以前使用过。
更新: 使得server.init改变并重新启动HHVM后,我得到了/var/log/hhvm/error.log以下错误:
Unable to read pid file /var/run/hhvm/pid for any meaningful pid
Unable to read pid file /var/run/hhvm/pid for any meaningful pid
Unable to read pid file /var/run/hhvm/pid for any meaningful pid
Unable to read pid file /var/run/hhvm/pid for any meaningful pid
Unable to read pid file /var/run/hhvm/pid for any meaningful pid
Unable to start page server
Shutting down due to failure(s) to bind in HttpServer::runAndExitProcess
在/ var /运行/ hhvm目录由www数据拥有
您确定hhvm正在运行,并且套接字文件配置正确('/ etc/hhvm/server.ini'或类似文件可能对诊断实际问题有用)。刚刚阅读hhvm文档[这里](https://docs.hhvm.com/hhvm/advanced-usage/fastCGI) –
这可能是更好的问[服务器故障](http://serverfault.com) – Machavity