我在ubuntu 12.04 LTS 64中安装了LEMP服务器
whit HHVM Fastcgi服务
我通过laravel.phar安装laravel(并通过作曲家测试)
当在brwoser中获取我的网站时,不显示任何错误,但在Chrome开发人员控制台中获取错误500
我在error.log文件中看不到任何错误(laravel – hhvm,Nginx)
存储目录权限是777
当我使用PHP CLI或hhvm命令时,它运行良好
谢谢你的帮助:)
我的位置块
location ~ \.(hh|PHP)${
fastcgi_split_path_info ^(.+\.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的问题是它没有显示太多错误,你必须继续观察HHVM或Laravel错误日志.
You’ll want to pay close attention to your error logs. HHVM doesn’t
report errors to the browser by default.
检查HHVM日志!
$tail -n 50 -f /var/log/hhvm/error.log
检查您的Laravel日志!
$tail -n 50 -f /path/to/laravel/app/storage/logs/laravel.log
配置参考
如果文件尚未存在,请创建文件/etc/Nginx/hhvm.conf.插入ff:
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;
}
然后将其包含在您的Nginx虚拟主机配置中.
例如.在/ etc / Nginx的/网站可用/ laravel
server {
listen 80 default_server;
root /vagrant/laravel/public;
index index.html index.htm index.PHP;
server_name localhost;
access_log /var/log/Nginx/localhost.laravel-access.log;
error_log /var/log/Nginx/locahost.laravel-error.log error;
charset utf-8;
location / {
try_files \$uri \$uri/ /index.PHP?\$query_string;
}
location = /favicon.ico { log_not_found off; access_log off; }
location = /robots.txt { log_not_found off; access_log off; }
error_page 404 /index.PHP;
include hhvm.conf; # INCLUDE HHVM HERE
# Deny .htaccess file access
location ~ /\.ht {
deny all;
}
}
然后重新加载Nginx:
$sudo service Nginx reload
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。