dsajkdadsa14222 2018-05-07 12:19
浏览 79
已采纳

HHVM FastCGI无法正常工作 - 没有响应

I'm new to HHVM and started to configure it in my Vagrant Machine to run as FastCGI but when I hit localhost:9000 in the browser It responses nothing but error

ERR_EMPTY_RESPONSE

but If I stop service using sudo service hhvm stop and run HHVM as normal runtime server by using hhvm -m server -p 9000 and hit the browser with localhost:9000 URL and it perfects fine,

The below is the configuration data in /etc/hhvm/server.ini

; php options

pid = /var/run/hhvm/pid

; hhvm specific

hhvm.server.port = 9000
hhvm.server.type = fastcgi
hhvm.server.default_document = index.php
hhvm.log.use_log_file = true
hhvm.log.file = /var/log/hhvm/error.log
hhvm.repo.central.path = /var/cache/hhvm/hhvm.hhbc
hhvm.server.source_root = /vagrant/www

This is from where I got help to set up FastCGI https://docs.hhvm.com/hhvm/basic-usage/proxygen#automatic-service-startup

How can I run it as automatic startup service?

Any help would be appreciated. Thanks in advance :)

  • 写回答

1条回答 默认 最新

  • dprh34164 2018-05-08 08:23
    关注

    A browser can't connect to a server running in FastCGI mode, as browsers talk HTTP not FastCGI. Instead, you need to set up a web server (e.g. Apache/Nginx) and have that talk with the browser and the FastCGI server.

    The document for running HHVM+FastCGI contains instructions for setting this up with both Apache and Nginx.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 如何在node.js中或者java中给wav格式的音频编码成sil格式呢
  • ¥15 不小心不正规的开发公司导致不给我们y码,
  • ¥15 我的代码无法在vc++中运行呀,错误很多
  • ¥50 求一个win系统下运行的可自动抓取arm64架构deb安装包和其依赖包的软件。
  • ¥60 fail to initialize keyboard hotkeys through kernel.0000000000
  • ¥30 ppOCRLabel导出识别结果失败
  • ¥15 Centos7 / PETGEM
  • ¥15 csmar数据进行spss描述性统计分析
  • ¥15 各位请问平行检验趋势图这样要怎么调整?说标准差差异太大了
  • ¥15 delphi webbrowser组件网页下拉菜单自动选择问题