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 luckysheet
  • ¥15 ZABBIX6.0L连接数据库报错,如何解决?(操作系统-centos)
  • ¥15 找一位技术过硬的游戏pj程序员
  • ¥15 matlab生成电测深三层曲线模型代码
  • ¥50 随机森林与房贷信用风险模型
  • ¥50 buildozer打包kivy app失败
  • ¥30 在vs2022里运行python代码
  • ¥15 不同尺寸货物如何寻找合适的包装箱型谱
  • ¥15 求解 yolo算法问题
  • ¥15 虚拟机打包apk出现错误