我正在尝试将我的网站的根目录重定向到 https。尽管重写发生了,但 https 不会产生任何结果。浏览器说。connecting to thinkingmonkey.me...
和停滞。
- 听 80和听 443存在于 conf 文件中。
- 我已经重新启动了 httpd。
- 我正在使用正确的证书文件和私钥文件。
- httpd 日志中没有错误,SSL 日志(我有一个单独的SSl 日志)。
- 即使我尝试直接访问https://thinkingmonkey.me,实际上也没有任何内容记录到 SSL 访问日志中。
Anetstat -pant | grep httpd
有这个:
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 :::443 :::* LISTEN 1334/httpd
tcp 0 0 :::80 :::* LISTEN 1334/httpd
Run Code Online (Sandbox Code Playgroud)
.htaccess:
RewriteEngine on
RewriteBase /
RewriteCond %{SERVER_PORT} 80
RewriteCond %{REQUEST_URI} ^/$
RewriteRule ^(.*)$ https://thinkingmonkey.me [L,R=302]
Run Code Online (Sandbox Code Playgroud)
重写日志数据: …
设想:
我有 2 个域:thinkingmonkey.me
& thinkingmonkey.com
。整个网站都在 下访问https
。从通用名称的 CA 购买了证书thinkingmonkey.me
。
对于http
:
www.thinkingmonkey.com、 thinkingmonkey.com和 www.thinkingmonkey.me有一个虚拟主机,并使用 _mod_rewrite_ 规则重定向到https://thinkingmonkey.me。
thinkmonkey.me有其单独的虚拟主机。
一切正常。
情况也是如此https
:
即www.thinkingmonkey.com、 thinkingmonkey.com和 www.thinkingmonkey.com有一个虚拟主机,并使用 _mod_rewrite_ 规则重定向到https://thinkingmonkey.me。
thinkmonkey.me有其单独的虚拟主机。
问题
- 现在,如果访问https://www.thinkingmonkey.com或https://thinkingmonkey.com,
- mod_ssl起作用并且在mod_rewrite重写https://thinkingmonkey.me之前发生 TLS 握手。
- 由于证书中的通用名称在thinkingmonkey.me下,此连接不受信任警告会在浏览器中显示。
- 除非我通过接受证书来完成握手,否则它不会被重定向到thinkingmonkey.me。这很烦人。
那么,
有没有办法访问mod_rewrite
之前mod_ssl
?
或者
我是否必须购买单独的证书才能摆脱这种情况?
A pgrep httpd
yilds 9 pids:
1624
1651
1652
1653
1654
1655
1656
1657
1658
Run Code Online (Sandbox Code Playgroud)
如果我使用第一个 pid(此处1624
)杀死 httpd 进程,则所有 httpd 进程都会被杀死。
虽然如果用第一个以外的 pid 杀死进程,只有那个进程会被杀死。一旦 httpd 进程数低于 6,它就会产生 httpd 进程并且 httpd 进程数保持在 6 不变。
当我手动启动 httpd 时不会发生这种情况。只创建了一个进程。
- 为什么是上述行为?
- httpd 是基于线程开始的吗?
Also I am running httpd on Fedora 15 on a 6 core processor.
而且我/etc/sysconfig/httpd
在/etc/sysconfig/httpd
注释中的每一行都没有改变任何东西。
是否可以使用由 comodo提供的免费 SSL 证书:Instant SSL。
该网站说:
我们对您的承诺:
您的 SSL 证书绝对没有成本或承诺。
您将获得具有完整 https 功能的免费 SSL 和 90 天的免费金色挂锁
我想将它用于测试目的。
- 用一个可以吗?
- 有什么收获吗?
- 以后可以转给其他证书提供者吗?
- StartCom提供的证书有多好?因为他们是免费的,有什么问题吗?
今天浏览我的评估日志,我发现有很多条目试图访问页面。(不存在的)。喜欢
- robots.txt(我知道这是用来做什么的)
- 申请
- favicon.ico(我知道这是用来做什么的)
- 等等
因此,显然404
返回了 a但还有其他 3 位代码(?)以及 404。
ip-address - - [date & time] "GET /some/file_OR_folder HTTP/1.1" 404 312
ip-address - - [date & time] "GET /some/file_OR_folder HTTP/1.1" 404 285
ip-address - - [date & time] "GET /some/file_OR_folder HTTP/1.1" 404 286
ip-address - - [date & time] "GET /some/file_OR_folder HTTP/1.1" 404 287
ip-address - - [date & time] "GET /some/file_OR_folder HTTP/1.1" 404 288
ip-address - - [date & time] "GET /some/file_OR_folder HTTP/1.1" …
Run Code Online (Sandbox Code Playgroud) apache-2.2 ×4
httpd ×3
ssl ×3
https ×2
mod-rewrite ×2
certificate ×1
fedora ×1
http ×1
security ×1