【问题标题】:htaccess is not being recognized on ec2 suse instance web serverhtaccess 在 ec2 suse 实例 Web 服务器上未被识别
【发布时间】:2012-09-18 17:07:41
【问题描述】:

好吧,这就是交易:我的 .htaccess 文件根本不工作

我的服务器设置是 Amazon EC2 实例上的 SuSE - Apache 已设置,mod_rewrite 已加载并启用 - 在我的 http.conf 我有:

<Directory />
    Options None
    AllowOverride All
    Order deny,allow
    Deny from all
</Directory>

<Directory /srv/www/htdocs/>
  AllowOverride All
</Directory>

# use .htaccess files for overriding,
AccessFileName .htaccess
# and never show them
<Files ~ "^\.ht">
    Order allow,deny
    Deny from all
</Files>
  • 在我安装了 CI 的服务器上,.htacces 没有做任何它应该做的事情。例如,为了测试它是否有效,我创建了一个 .htacess,上面写着“全部拒绝”,它仍然能够访问这些页面。

  • 每次更改配置文件时,我都会重新启动 apache。

什么可能导致我的 htaccess 文件无法识别?

【问题讨论】:

    标签: apache .htaccess mod-rewrite amazon-ec2 suse


    【解决方案1】:

    正在编辑错误的配置文件,

    需要编辑 default-server.conf 而不是 httpd.conf 才能进行更改

    【讨论】:

      猜你喜欢
      • 2013-06-14
      • 1970-01-01
      • 2017-10-25
      • 2014-08-29
      • 2016-05-13
      • 2016-05-21
      • 2018-03-08
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多