V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
jacob
V2EX  ›  问与答

关于 laravel 的 404 问题

  •  
  •   jacob · 2015-06-13 17:36:06 +08:00 · 3479 次点击
    这是一个创建于 3232 天前的主题,其中的信息可能已经有所发展或是发生改变。

    我现在可以用

    http://localhost/ll5/public/articles
    或
    http://localhost/ll5/public/index.php/articles
    

    地址,

    但是我给虚拟目录一个假的域名,比如这样的

    127.0.0.1 laravel-project.com
    

    用域名就只能打开laravel的默认的欢迎页面,其他的页面全都是404。

    我的问题就是,有什么办法,能让我看到,我输入一个域名后,实际访问的是哪个目录吗?
    因为我在我的php,apache和htaccess的配置里实在找不出错误。

    3 条回复    2015-06-14 21:11:39 +08:00
    angelhorn
        1
    angelhorn  
       2015-06-13 18:16:49 +08:00
    httpd.conf
    LoadModule rewrite_module modules/mod_rewrite.so
    jacob
        2
    jacob  
    OP
       2015-06-13 19:22:12 +08:00
    @angelhorn 已经开启。
    angelhorn
        3
    angelhorn  
       2015-06-14 21:11:39 +08:00
    vhost.conf
    指向ll5/public
    hosts文件配置成 127.0.0.1 laravel-project.com
    就不可能再出错误
    可以看apache自带的日志 access和error
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5246 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 08:31 · PVG 16:31 · LAX 01:31 · JFK 04:31
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.