I've created my first Laravel app and it works locally. The routes and controllers and stuff live in the app directory, and I see it at: http://homestead.app (I don't include /app in the url). I made it from these laracasts: https://laracasts.com/series/laravel-5-from-scratch
The problem: I've successfully deployed it to Heroku, but when I go to the root url (https://dk-laravel-test.herokuapp.com), I get a 403 error:
Forbidden
You don't have permission to access / on this server.
Clues:
According to the Papertrail log, it's actually trying to go to /app/ but I'm not sure why- is that normal, or something that's inadvertently set somewhere?
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: Cannot serve directory /app/: No matching DirectoryIndex (index.php,index.html,index.htm) found, and server-generated directory index forbidden by Options directive
when I put an index.php file at the root and then try to go there directly I get a 404 (not sure if that's a clue for this or a different problem): https://dk-laravel-test.herokuapp.com/index.php
(3. I've previously added a little test php app to heroku and that served fine- nothing obvious jumps out comparing the two, but Laravel's obviously a lot fancier)
Question: where could I be accidentally telling it to go to /app/? Is that normal? Apologies if this is basic, it's my first rodeo and I've been looking around for hours
Other info/stuff I checked: - Following this article (https://mattstauffer.co/blog/installing-a-laravel-app-on-heroku), I set the BUILDPACK_URL, and in my Procfile I have:
web: vendor/bin/heroku-php-apache2 public
No different results if I remove the 'public' argument (tried after reading this https://devcenter.heroku.com/articles/custom-php-settings#setting-the-document-root), or change it to /Laravel/public
I haven't touched the .htaccess file that from my laravel project:
Options -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]
I confirmed that Procfile is capitalized (Symfony on Heroku: 403 Forbidden You don't have permission to access / on this server)
In case it matters, I'm using Homestead
Any ideas? Where could I be accidentally telling it to go to /app/? Other stuff I should check? Any help is GREATLY appreciated!!