laravel 5.1 says for all the other routes that exc

2019-07-07 01:44发布

问题:

Hi i have installed the laravel on ec2 instance using this video

www.youtube.com/watch?v=8ARpTKWc6lQ

I have changed the document root path from /var/www to /var/www/html/laravel/public
in the deafult.conf file as described at the end of the video
But now my when i open my website my homepage http://52.26.133.246/ which have ('/') shows fine but when i open my other page with routes like ('AdminApp') or you can simple click on admin link on the navbar of home page with whole link is http://52.26.133.246/AdminApp it says
404 page not found
and also

The requested URL /AdminApp was not found on this server.

but when i use /index.php in the url the page is shown here is the link http://52.26.133.246/index.php/AdminApp

Also kindly check this link also to without index.php

http://52.26.133.246/welcome

with index.php

http://52.26.133.246/index.php/welcome

Kindly help me. Thanks

回答1:

Try sudo a2enmod rewrite and

Check your etc/httpd/conf/httpd.conf file. It should have the following in it:

AllowOverride None

change it to

AllowOverride All