Php 将symfony2安装在流浪汉上
我试图在vagrant上运行symfony,但我有一个错误:Php 将symfony2安装在流浪汉上,php,symfony,vagrant,symfony-2.1,homestead,Php,Symfony,Vagrant,Symfony 2.1,Homestead,我试图在vagrant上运行symfony,但我有一个错误: "NetworkError: 500 hphp_invoke - http://test.com:8000/" My 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.co
"NetworkError: 500 hphp_invoke - http://test.com:8000/"
My 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中添加了。我删除了缓存。请帮帮我 解决方案是更改location/,如下所示:location/{try_files$uri/app.php;}