最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

php hhvm nginx并发,php

运维笔记admin52浏览0评论

php hhvm nginx并发,php

php hhvm nginx并发,php

我知道这不是一个普遍的问题,但是我似乎无法以某种方式找到直接的答案.有人能够尽可能直接地回答这个问题吗?

我的NGINX(提供静态文件)和HHVM(从控制台中的hhvm index.php)工作正常,但是我无法通过NGINX访问.php而没有得到404

情况:

HHVM 3.5.0

Nginx 1.7.9

我在/etc/nginx/conf.d/default.conf中有这个

server {

listen 80;

server_name localhost;

location / {

root /var/www;

index index.php index.html index.htm;

}

error_page 500 502 503 504 /50x.html;

location = /50x.html {

root /usr/share/nginx/html;

}

include hhvm.conf;

}

在HHVM.conf中

location ~ \.(hh|php)${

fastcgi_keep_conn on;

fastcgi_pass 127.0.0.1:9000;

fastcgi_index index.php;

fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

include fastcgi_params;

}

解决方法:

将以下HHVM conf替换为您的:

location ~ \.(hh|php)${

fastcgi_keep_conn on;

fastcgi_pass 127.0.0.1:9000;

fastcgi_index index.php;

fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

include fastcgi_params;

}

问题

我看到$document_root和$fastcgi_script_name之间有一个空格.

更新资料

通过使用/ var / www更改$document_root来解决

标签:nginx,hhvm,php

来源: .html

发布评论

评论列表(0)

  1. 暂无评论