Laravel - 更改目录路径

时间:2014-12-31 15:17:23

标签: apache laravel laravel-4

我有一个由one.com托管的域名,我有以下目录:

/webpage.com/httpd.private
/webpage.com/httpd.www
/webpage.com/tmp

公共网站空间位于httpd.www,私人主文件夹位于httpd.private。

如何配置laravel将httpd.www用作应用程序的“公共”部分,httpd.private用于存储“vendor,bootstrap,app”文件夹?

祝你好运, 的Øyvind

1 个答案:

答案 0 :(得分:0)

您需要更改两个文件

public / index.php(new httpd.www/index.php

require __DIR__.'/../httpd.private/bootstrap/autoload.php';
// ...
$app = require_once __DIR__.'/../httpd.private/bootstrap/start.php';

bootstrap / paths.php(new httpd.private/bootstrap/paths.php

'public' => __DIR__.'/../httpd.www',

显然你需要移动文件使其看起来像

- httpd.private
--- app
--- bootstrap
--- vendor
--- artisan
--- composer.json
--- ...

- httpd.www
--- index.php
--- .htaccess
--- ...