【问题标题】:HHVM FastCGI not working properly - no responseHHVM FastCGI 无法正常工作 - 无响应
【发布时间】:2018-05-07 12:19:07
【问题描述】:

我是HHVM 的新手,并开始在我的Vagrant 机器中将其配置为以FastCGI 运行,但是当我在浏览器中点击localhost:9000 时,它只响应错误

ERR_EMPTY_RESPONSE

但如果我停止使用sudo service hhvm stop 的服务并使用hhvm -m server -p 9000HHVM 作为普通运行时服务器运行,并使用localhost:9000 URL 访问浏览器,它就完美了,

下面是/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

这是我在设置 FastCGI https://docs.hhvm.com/hhvm/basic-usage/proxygen#automatic-service-startup 时获得帮助的地方

如何将其作为自动启动服务运行?

任何帮助将不胜感激。在此先感谢:)

【问题讨论】:

  • 可以运行sudo systemctl enable hhvm 吗?
  • 嗨@FelippeDuarte 结果来自sudo: systemctl: command not found 这是一个使用ubuntu/trusty64 的全新无业游民设置。谢谢

标签: php vagrant ubuntu-14.04 fastcgi hhvm


【解决方案1】:

浏览器无法连接到以 FastCGI 模式运行的服务器,因为浏览器使用的是 HTTP 而不是 FastCGI。相反,您需要设置一个 Web 服务器(例如 Apache/Nginx)并与浏览器和 FastCGI 服务器进行通信。

running HHVM+FastCGI 的文档包含使用 Apache 和 Nginx 进行设置的说明。

【讨论】:

  • 啊...这可能是一个解决方案。谢谢
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2017-12-14
  • 2015-10-09
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多