为什么 Apache(centos 7) 看不到我制作的路线?



我做了路由,但 apache 服务器看不到该路由。Laravel欢迎页面没有问题,但是当我尝试在视图中制作另一个文件夹时。Apache看不到该页面。404 找不到弹出。

这是路由和控制器代码

Route::get('/pages', 'Pages@index');

和控制器

function index(){
return "test";

还有我的httpd我的文档根:/var/www/html/laravel/public

模块目录: 目录索引索引.html索引.php

我还需要更改其他内容吗? 使此路线可访问?

在 centOS 7 中,None--to->All使它很好。

<Directory /var/www/html>
. . .
# 
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride None --> All  
. . .
</Directory>

最新更新