首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法让hhvm使用nginx

无法让hhvm使用nginx
EN

Stack Overflow用户
提问于 2016-10-04 12:16:43
回答 1查看 652关注 0票数 0

我已经安装了nginx和hhvm,并在ubuntu上作为进程运行。这些信息抄录在下面。我在/usr/share/ nginx /html中有一个index.php文件(由nginx指向),但是当我试图访问nginx提供的站点时,我会得到以下有关hhvm的错误:

/var/log/nginx/error.log

代码语言:javascript
复制
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配置(配置的一部分)

代码语言:javascript
复制
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文件更改为以下内容,并重新启动了服务,但它似乎没有完成这项工作

代码语言:javascript
复制
hhvm.server.file.socket=/var/run/hhvm/hhvm.sock

我注释掉了之前使用的9000端口。

更新:更改并重新启动hhvm后,在/var/log/hhvm/error.log中得到以下错误:

代码语言:javascript
复制
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拥有。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2016-10-04 18:12:35

最后,我在端口9000上运行hhvm,并将nginx (fasgcgi_pas)指向端口(而不是使用文件套接字选项)。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/39852095

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档