Laravel NotFoundHTTPException on local setup

我从另一个开发人员那里继承了一个使用Laravel和Cartalyst构建的网站,该开发人员在生产服务器上正常工作,但是在我的本地安装中,我在主页上得到了一个NotFoundHTTPException,没有其他页面工作。本地设置是运行Ubuntu并使用Apache的笔记本电脑。


尝试搜索论坛无济于事。该站点在生产服务器上完全正常工作,因此感觉它一定是我的配置问题,而不是实际的编码问题。


当一个人运行php工匠路线:列出所有路线时。还尝试清除路由缓存。


任何帮助或建议将不胜感激。下面是相关文件位。


.env 文件(相关部分)



    APP_KEY=xxxxxxxxxxxx

    APP_ENV=local

    APP_DEBUG=true

    APP_LOG_LEVEL=debug

    APP_URL=https://local.voicemag.uk


.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>

Apache configuration



    <VirtualHost *:443> ServerName local.voicemag.uk

    ServerAlias local.voicemag.uk


    ServerAdmin webmaster@localhost

    DocumentRoot /home/chris/Documents/Webdev/fresh/voicemagv3/public_html


    SSLEngine on

    SSLCertificateFile "/home/chris/Documents/Webdev/ssl/server.crt"

    SSLCertificateKeyFile "/home/chris/Documents/Webdev/ssl/server.key"


    <Directory /home/chris/Documents/Webdev/fresh/voicemagv3/public_html>

      Require all granted

      Allowoverride All

    </Directory>


    ErrorLog ${APACHE_LOG_DIR}/error.log

    CustomLog ${APACHE_LOG_DIR}/access.log combined

    </VirtualHost>

如果您需要进一步的信息,请告诉我。


一只甜甜圈
浏览 104回答 2
2回答

守着一只汪

解决方案是运行php artisan extension:autoload

呼啦一阵风

NotFOundHttpException只是因为您的网络找不到与该名称相关的任何路由,请尝试通过制作虚拟主机或通过php&nbsp;artisan&nbsp;serve哪个在&nbsp;http://localhost:8000&nbsp;托管您的网站
打开App,查看更多内容
随时随地看视频慕课网APP