laravel 5.1表示使用(ec)在在线Amazon Server上找不到404页面的('/')除外的所有其他路由 [英] laravel 5.1 says for all the other routes that except ('/') that 404 page not found on online Amazon Server using ec2

查看:84
本文介绍了laravel 5.1表示使用(ec)在在线Amazon Server上找不到404页面的('/')除外的所有其他路由的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用此视频在ec2实例上安装了laravel

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

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

我从/var/www更改了文档根路径 如视频末尾所述,在deafult.conf文件中转到/var/www/html/laravel/public

但是现在当我打开网站时,我的主页 http://52.26.133.246/中显示('/')的状态很好,但当我使用('AdminApp')之类的路线打开其他页面时,或者您可以简单地单击主页导航栏中的管理链接,而整个链接为 http://52.26.133.246/AdminApp 它说
404 page not found
还有

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.

但是当我在URL中使用/index.php时会显示该页面 链接在这里 http://52.26.133.246/index.php/AdminApp

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

也请检查此链接是否不带index.php

Also kindly check this link also to without index.php

http://52.26.133.246/welcome

with index.php

with index.php

http://52.26.133.246/index.php/welcome

请帮助我. 谢谢

推荐答案

尝试sudo a2enmod rewrite

检查您的etc/httpd/conf/httpd.conf文件. 它应该包含以下内容:

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

AllowOverride None

将其更改为

AllowOverride All 

这篇关于laravel 5.1表示使用(ec)在在线Amazon Server上找不到404页面的('/')除外的所有其他路由的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆