我創建了我的第一個Laravel應用程序,它在本地工作。路線和控制器和東西住在應用程序目錄中,我看到它在:http://homestead.app(我不包括URL中的/應用程序)。我從這些laracasts使它:https://laracasts.com/series/laravel-5-from-scratchLaravel在Heroku上:它試圖去/ app /(403禁止)
的問題:我已經成功地部署到Heroku的,但是當我去到根網址(https://dk-laravel-test.herokuapp.com),我得到一個403錯誤:
Forbidden
You don't have permission to access/on this server.
線索:
按照Papertrail日誌,它實際上是試圖去/應用/,但我不知道爲什麼 - 是正常的,或者說這是inadv在什麼地方設置?
Sep 04 05:50:40 dk-laravel-test app/web.1:[Fri Sep 04 12:50:40.115461 2015] [autoindex:error] [pid 104:tid 140623923373824] [client 10.157.115.7 :23446] AH01276:無法提供目錄/ app /:找不到與DirectoryIndex(index.php,index.html,index.htm)匹配的目錄索引,以及服務器生成的目錄索引禁止通過Options指令
當我把一個索引在根PHP文件,然後嘗試去那裏直接,我收到了404(不知道這是這個線索或不同的問題):https://dk-laravel-test.herokuapp.com/index.php
(3.我以前添加的小測試PHP應用的Heroku和服務的精細沒有明顯跳出兩相比較,但Laravel的明顯了很多票友)
問題:其中可能我意外地告訴它去/應用/?這是正常的嗎?道歉,如果這是基本的,這是我第一次圈地和我一直在四處尋找了幾個小時
其他信息/東西,我檢查: - 繼這篇文章(https://mattstauffer.co/blog/installing-a-laravel-app-on-heroku),我設置了BUILDPACK_URL,在我Procfile我有:
web: vendor/bin/heroku-php-apache2 public
沒有不同的結果,如果我刪除了 '公衆' 的說法(閱讀本https://devcenter.heroku.com/articles/custom-php-settings#setting-the-document-root後試過),或將其更改爲/ Laravel /公共
我沒碰過.htaccess文件,從我的laravel項目:
選項-MultiViews
RewriteEngine On # Redirect Trailing Slashes If Not A Folder... RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)/$ /$1 [L,R=301] # Handle Front Controller... RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule^index.php [L]
我證實,Procfile是大寫(Symfony on Heroku: 403 Forbidden You don't have permission to access/on this server)
萬一它很重要,我使用Homestead
任何想法?我可以在哪裏無意中告訴它去/ app /?其他的東西,我應該檢查?任何幫助是極大的讚賞!!