2017-01-03 151 views
1

我試圖移動laravel項目主辦的Virtualmin,我感動了所有的文件夾在我的文檔根移動Laravel項目託管

HOME/ 
    MYPWD/ 
     APP/ 
     BOOTSTRAP/ 
     CONFIG/ 
     DATABASE/ 
     .... 
     PUBLIC_HTML/ 

裏面的public_html我與這些線的index.php:

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

login.php頁面正常工作,但登錄後,瀏覽器返回由遞歸重定向引起的錯誤。在日誌中我得到這個錯誤:

exception 'ReflectionException' with message 'Class App\Http\Middleware\isNotAuth does not exist' in /home/mypwd/vendor/laravel/framework/src/Illuminate/Container/Container.php:734

我應該改變別的東西?像命名空間?

這是我composer.json文件:

{ 
    "name": "laravel/laravel", 
    "description": "The Laravel Framework.", 
    "keywords": ["framework", "laravel"], 
    "license": "MIT", 
    "type": "project", 
    "require": { 
     "php": ">=5.5.9", 
     "laravel/framework": "5.2.*", 
     "doctrine/dbal": "^2.5", 
     "laravelcollective/html": "^5.2", 
     "symfony/event-dispatcher": "^3.2", 
     "psr/log": "^1.0" 
    }, 
    "require-dev": { 
     "fzaninotto/faker": "~1.4", 
     "mockery/mockery": "0.9.*", 
     "phpunit/phpunit": "~4.0", 
     "symfony/css-selector": "2.8.*|3.0.*", 
     "symfony/dom-crawler": "2.8.*|3.0.*" 
    }, 
    "autoload": { 
     "classmap": [ 
      "database" 
     ], 
     "psr-4": { 
      "App\\": "app/" 
     } 
    }, 
    "autoload-dev": { 
     "classmap": [ 
      "tests/TestCase.php" 
     ] 
    }, 
    "scripts": { 
     "post-root-package-install": [ 
      "php -r \"copy('.env.example', '.env');\"" 
     ], 
     "post-create-project-cmd": [ 
      "php artisan key:generate" 
     ], 
     "post-install-cmd": [ 
      "Illuminate\\Foundation\\ComposerScripts::postInstall", 
      "php artisan optimize" 
     ], 
     "post-update-cmd": [ 
      "Illuminate\\Foundation\\ComposerScripts::postUpdate", 
      "php artisan optimize" 
     ] 
    }, 
    "config": { 
     "preferred-install": "dist" 
    } 
} 

雖然這是我的.gitignore文件:

/vendor 
/node_modules 
/public/storage 
Homestead.yaml 
Homestead.json 
.env 
+0

似乎有問題的代碼與服務器端無關。你能發佈composer.json文件內容嗎? –

+0

你的.gitignore文件是什麼? – Borna

+0

@SachinG。我發佈了它。我已經運行了作曲家dump-autoload – Mintendo

回答

0

我自己解決這個問題:服務器的Linux是大小寫敏感的,所以在Kernel.php我所謂的中間件類與IsNotAuth,但文件名isNotAuth