我已经安装了nginx和hhvm,并在ubuntu上作为进程运行。这些信息抄录在下面。我在/usr/share/ nginx /html中有一个index.php文件(由nginx指向),但是当我试图访问nginx提供的站点时,我会得到以下有关hhvm的错误:
/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;
}我已经检查过了-这两个程序都在运行。对于如何进一步排除这些问题,有什么想法吗?
更新:我将/etc/hhvm中的server.ini文件更改为以下内容,并重新启动了服务,但它似乎没有完成这项工作
hhvm.server.file.socket=/var/run/hhvm/hhvm.sock我注释掉了之前使用的9000端口。
更新:更改并重新启动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/run/hhvm目录由www-data拥有。
发布于 2016-10-04 18:12:35
最后,我在端口9000上运行hhvm,并将nginx (fasgcgi_pas)指向端口(而不是使用文件套接字选项)。
https://stackoverflow.com/questions/39852095
复制相似问题