我已经为我的Ubuntu 14.04 VPS安装了以下ngnixconfiguration,运行ngnix的HHVM:
server { listen 80 default_server; listen [::]:80 default_server ipv6only=on; root /home/lephenix/main_website; index.PHP index.html index.htm; # Make site accessible from http://localhost/ server_name localhost; include hhvm.conf; location / { # First attempt to serve request as file,then # as directory,then fall back to displaying a 404. try_files $uri $uri/ /index.PHP?q=$uri&$args; # Uncomment to enable naxsi on this location # include /etc/Nginx/naxsi.rules } }
问题是,当我启用这个configuration,我从ngnix得到一个错误:
2014/09/07 13:16:01 [emerg] 13584#0: unkNown directive "index.PHP" in /etc/Nginx/sites-enabled/default:6
我看了,这似乎是这种configuration的正确结构。 即使当我删除index.PHP错误然后更改为:
2014/09/07 13:17:03 [emerg] 13648#0: unkNown directive "index.html" in /etc/Nginx/sites-enabled/default:6
我遵循以下指南设置服务器: http : //webdevstudios.com/2014/07/17/setting-up-wordpress-Nginx-hhvm-for-the-fastest-possible-load-times/
在Ubuntu 11.10上构buildlibcurl 7.21.2的问题(Hiphop)
在Windows中运行HipHop PHP
在此先感谢您的帮助
它需要是:
index index.PHP index.html index.htm
该指令是“索引”。
另外,“try_files”是错误的。 改成:
try_files $uri $uri/ /index.PHP$is_args$args
另外配置文件正确缩进更好。 这使得调试更容易。
我怀疑你所遵循的教程是错误的,这当然是无效的,因为在尝试给它分配一些东西之前需要先命令指令。
弹出一个笔记到教程作者也许? 这将是很好的,他们纠正,所以没有人落在这一个:)
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。