【问题标题】:laravel 5.1 says for all the other routes that except ('/') that 404 page not found on online Amazon Server using ec2laravel 5.1 表示除了 ('/') 之外的所有其他路由,使用 ec2 在在线亚马逊服务器上找不到 404 页面
【发布时间】:2015-10-12 18:39:06
【问题描述】:

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

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
还有

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

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

也请检查这个链接也没有index.php

http://52.26.133.246/welcome

使用 index.php

http://52.26.133.246/index.php/welcome

请帮助我。 谢谢

【问题讨论】:

  • 服务器需要 mod_rewrite 扩展
  • @KiranLM 我是 .htaccess 和 mods 和文件权限的初学者,我该怎么做?

标签: php .htaccess laravel amazon-ec2 laravel-5


【解决方案1】:

试试sudo a2enmod rewrite

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

AllowOverride None

改成

AllowOverride All 

【讨论】:

  • Kiran LM 我正在​​使用 cygwin 我在这个目录 /var/www/html/laravel 我使用过这个命令 cd etc/httpd/conf/httpd.conf 但它对我说没有这样的文件或目录请帮助我..
  • 通过cd /移动到根目录,然后cd etc/httpd/conf/,列出目录dirls并确保有httpd.conf
  • Kirna LM cd for command etc/httpd/conf/ 它说没有这样的文件或目录
  • etc 之前放一个/ => cd /etc/httpd/conf/httpd.conf
  • 它仍然给我这个错误没有这样的文件或目录
猜你喜欢
  • 2016-03-10
  • 2020-06-06
  • 2018-08-20
  • 2018-07-05
  • 2014-03-12
  • 2015-11-18
  • 2016-06-07
  • 1970-01-01
  • 2017-01-03
相关资源
最近更新 更多