在vagrant上安装symfony2

时间:2015-03-13 21:00:25

标签: php symfony vagrant symfony-2.1 homestead

我试图在流浪汉上运行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中添加了。我删除了缓存。请帮助我!

0 个答案:

没有答案