【问题标题】:Could someone please tell me why this apache config results in 404s?有人可以告诉我为什么这个 apache 配置会导致 404s 吗?
【发布时间】:2012-04-18 19:07:42
【问题描述】:

我已经更改了所有个人信息,但是这个完全相同的配置在 *:80 上运行良好。为重写和正常访问日志打开详细日志级别会创建一个包含 SSL 信息的文件,但没有实际的文档请求。被难住了。

<VirtualHost *:443>
ServerName *.domain.com
DocumentRoot /domain/web/public
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www.* [NC]
RewriteCond %{HTTP_HOST} ^([^\.]+)\.domain\.com
RewriteRule ^(.*) /file.php?parameter=%1 [L]
<Directory /domain/web/public>
Options -Indexes IncludesNOEXEC FollowSymLinks -MultiViews
AllowOverride All
Order allow,deny
Allow from all
</Directory>
SSLEngine on
SSLCertificateFile /domain/etc/domain.crt
SSLCertificateKeyFile /domain/etc/domain.key
</VirtualHost>

【问题讨论】:

  • 我认为您还没有找到日志...
  • 添加了这个:ErrorLog /domain/web/public/log.log LogLevel debug 它只包含 SSL 信息。刷新/访问站点不会增加日志文件的大小。
  • 已解决:其他虚拟主机 conf 文件受到干扰。就像我的猫和我的晚餐一样。
  • 提交您的解决方案作为答案并接受它

标签: apache mod-rewrite ssl virtualhost


【解决方案1】:

其他虚拟主机文件干扰了相关虚拟主机。不是最好的解决方案,但遵循 craniumonempty 的要求:我将所有其他主机文件注释掉,什么也不做,直到我有更多时间弄清楚为什么微调它们不起作用。

【讨论】:

    猜你喜欢
    • 2015-07-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-11-16
    • 2020-11-30
    相关资源
    最近更新 更多