【问题标题】:The requested URL /contacts was not found on this server - trying to set up cakePHP on ubuntu and getting this error在此服务器上找不到请求的 URL /contacts - 尝试在 ubuntu 上设置 cakePHP 并收到此错误
【发布时间】:2018-07-21 18:21:32
【问题描述】:

我的项目在 Windows 的 Openserver 上运行良好。但现在我正试图将其转移到 Ubuntu。 因此主页可用(但所有外部脚本、css、js 和图像都返回 404 错误)。此外,每个内部页面都不可用(在此服务器上未找到请求的 URL /blablabla)。 我究竟做错了什么? 启用了 mod_rewrite,apache 日志没有错误。

【问题讨论】:

    标签: php ubuntu mod-rewrite cakephp


    【解决方案1】:

    我想通了。 只需要更换

    <Directory /var/www/>
        Options Indexes FollowSymLinks
        AllowOverride None
        Require all granted
    </Directory>
    

    到这里:

    <Directory /var/www/>
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted
    </Directory>
    

    apache.conf

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-09-09
      • 1970-01-01
      • 2017-09-09
      • 2017-03-21
      • 2010-10-16
      • 1970-01-01
      相关资源
      最近更新 更多