我试图在 vagrant 上运行 symfony,但出现错误:
"NetworkError: 500 hphp_invoke - http://test.com:8000/"
我的 test.com :
server {
listen 80;
server_name test.com;
root /home/vagrant/Workspace/test/web;
index app_dev.php;
access_log off;
error_log /var/log/nginx/test.com-error.log error;
location / {
if (-f $request_filename) {
expires max;
break;
}
if ($request_filename !~ "\.(js|htc|ico|gif|jpg|png|css)$") {
rewrite ^(.*) /app_dev.php last;
}
}
location ~ \.php($|/) {
set $script $uri;
set $path_info "";
if ($uri ~ "^(.+\.php)(/.+)") {
set $script $1;
set $path_info $2;
}
fastcgi_pass 127.0.0.1:9000;
include fastcgi_params;
fastcgi_param PATH_INFO $path_info;
fastcgi_param SCRIPT_FILENAME $document_root/$script;
fastcgi_param SCRIPT_NAME $script;
}
}
我的 app_dev.php :
$loader = require_once __DIR__.'/../app/bootstrap.php.cache';
Debug::enable();
require_once __DIR__.'/../app/AppKernel.php';
$kernel = new AppKernel('dev', true);
$kernel->loadClassCache();
$request = Request::createFromGlobals();
$response = $kernel->handle($request);
$response->send();
$kernel->terminate($request, $response);
我查看日志,没有任何错误。我在我的主机中添加了 127.0.0.1 test.com。我删除了缓存。请帮帮我!