dsajkdadsa14222
2018-05-07 12:19 阅读 53
已采纳

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 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.

    点赞 评论 复制链接分享

相关推荐