0
votes

I have a Laravel 5.1 app started that works fine on local dev hosting. I installed Laravel 5.1 on AWS Ubuntu LAMP. I have uploaded my Resources folder, my controllers and routes, and the .htacess file from the public folder. When I hit the site in a browser, I get a view that just has "Laravel 5" in the middle of the screen. I cannot find a view in the files that has that file. Also, I get a 404 when I try to hit any of my routes.

Let me know of any files you need to see. But, I am hoping this issue is something higher level that I missed.

Thanks in advance for any help....

Adding the requested .conf

<VirtualHost *:80>
  ServerAdmin webmaster@localhost
  DocumentRoot /var/www/SalesBrainCRM/public
  <Directory "/var/www/SalesBrainCRM/public">
    allow from all
    Options +Indexes
  </Directory>

  ErrorLog ${APACHE_LOG_DIR}/error.log
  CustomLog ${APACHE_LOG_DIR}/access.log combine
</VirtualHost>

Root View Issue Resolved My JavaScript was not getting pulled in correctly. I suppose Laravel has a default view that was pulled in somehow???

I still have the rewrite issue. I have tried everything suggested and others I have found. I still have to include index.php in URLS for routes to function.

2
That means your routes are not included in the laravel system you uploaded. - TecBeast
@TecBeast The routes.php file is on the server and is correct. The views are there and correct. Where could the server pick up the file I am seeing? - Roger Creasy
pls run php artisan route:list - TecBeast
@TecBeast all of my routes are listed with this command - Roger Creasy

2 Answers

1
votes

Is mod_rewrite enabled?

sudo a2enmod rewrite

Once you've done that then check your Apache conf file which is located (on Ubuntu) at /etc/apache2/site-available

It may be just called something like 000-default.conf

Look in there and paste your results.

1
votes

I found the solution. In the site's .conf file, I changed

 <Directory "/var/www/SalesBrainCRM/public">

to

 <Directory /var/www/SalesBrainCRM/public/>

The changes are remove the "s and add the trailing /.

Thanks to all who offered assistance. You all led me to the solution!