Laravel:除了索引之外,找不到所有页面

Laravel:除了索引之外,找不到所有页面,laravel,amazon-ami,ec2-ami,Laravel,Amazon Ami,Ec2 Ami,我刚刚将我的应用程序部署到AMI ec2服务器上,下面是一些教程,其中介绍了如何修改config/app.php,如: /* |-------------------------------------------------------------------------- | Application URL |-------------------------------------------------------------------------- |

我刚刚将我的应用程序部署到AMI ec2服务器上,下面是一些教程,其中介绍了如何修改config/app.php,如:

/*
    |--------------------------------------------------------------------------
    | Application URL
    |--------------------------------------------------------------------------
    |
    | This URL is used by the console to properly generate URLs when using
    | the Artisan command line tool. You should set this to the root of
    | your application so that it is used when running Artisan tasks.
    |
    */

    'url' => env('APP_URL', 'http://52.67.251.19/'),
。。。并将httpd.conf更改如下:

# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
# 
DocumentRoot "/var/www/html/nnid/public/"

# 
# Relax access to content within /var/www.
#
<Directory "/var/www/nnid/public/">
    AllowOverride None
    # Allow open access:
    Require all granted
</Directory>
#DocumentRoot:您将从中为您的用户提供服务的目录
#文件。默认情况下,所有请求都来自此目录,但
#符号链接和别名可用于指向其他位置。
# 
DocumentRoot“/var/www/html/nnid/public/”
# 
#放宽对/var/www内内容的访问。
#
不允许超限
#允许开放访问:
要求所有授权

但是,除了登录页之外,找不到所有页面。有什么提示吗?

确保您的服务器上已打开mod_rewrite

此外,Laravel 5.6还附带此.htaccess文件,该文件位于公用文件夹中

<IfModule mod_rewrite.c>
    <IfModule mod_negotiation.c>
        Options -MultiViews -Indexes
    </IfModule>

    RewriteEngine On

    # Handle Authorization Header
    RewriteCond %{HTTP:Authorization} .
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

    # Redirect Trailing Slashes If Not A Folder...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_URI} (.+)/$
    RewriteRule ^ %1 [L,R=301]

    # Handle Front Controller...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.php [L]
</IfModule>

选项-多视图-索引
重新启动发动机
#句柄授权头
RewriteCond%{HTTP:Authorization}。
重写规则。*-[E=HTTP\U授权:%{HTTP:AUTHORIZATION}]
#如果不是文件夹,则重定向尾部斜杠。。。
重写cond%{REQUEST_FILENAME}-D
重写cond%{REQUEST_URI}(+)/$
重写规则^1[L,R=301]
#处理前控制器。。。
重写cond%{REQUEST_FILENAME}-D
重写cond%{REQUEST_FILENAME}-F
重写规则^index.php[L]
只需确保它与您当前的匹配。

已解决!
问题出在模式重写的httpd.conf上。改为“全部”,工作起来轻松自如

DocumentRoot有一个额外的“html”文件夹。我当然有!奎尔迪泽,欧盟副主席:帕卡拉,图多贝姆?在意大利,意大利的消费者们正在为意大利面食做准备?她是一个阿帕奇·科莫进程的开发者。