小编Thi*_*key的帖子

为什么 https 不起作用?

我正在尝试将我的网站的根目录重定向到 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)

重写日志数据: …

mod-rewrite ssl https httpd apache-2.2

11
推荐指数
1
解决办法
5万
查看次数

有没有办法在“mod_ssl”之前访问“mod_rewrite”?

设想:

我有 2 个域:thinkingmonkey.me& thinkingmonkey.com。整个网站都在 下访问https。从通用名称的 CA 购买了证书thinkingmonkey.me

对于http

  • www.thinkingmonkey.comthinkingmonkey.comwww.thinkingmonkey.me有一个虚拟主机,并使用 _mod_rewrite_ 规则重定向到https://thinkingmonkey.me

  • thinkmonkey.me有其单独的虚拟主机。

  • 一切正常。

情况也是如此https

  • www.thinkingmonkey.comthinkingmonkey.comwww.thinkingmonkey.com有一个虚拟主机,并使用 _mod_rewrite_ 规则重定向到https://thinkingmonkey.me

  • thinkmonkey.me有其单独的虚拟主机。

问题

  • 现在,如果访问https://www.thinkingmonkey.comhttps://thinkingmonkey.com
    • mod_ssl起作用并且在mod_rewrite重写https://thinkingmonkey.me之前发生 TLS 握手。
    • 由于证书中的通用名称在thinkingmonkey.me下,此连接不受信任警告会在浏览器中显示。
    • 除非我通过接受证书来完成握手,否则它不会被重定向到thinkingmonkey.me。这很烦人。

那么,
有没有办法访问mod_rewrite之前mod_ssl
或者
我是否必须购买单独的证书才能摆脱这种情况?

mod-rewrite ssl https apache-2.2

4
推荐指数
1
解决办法
3012
查看次数

为什么在启动时自动启动 httpd 时会运行 9 个 httpd 进程?

A pgrep httpdyilds 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注释中的每一行都没有改变任何东西。

fedora httpd apache-2.2

3
推荐指数
1
解决办法
927
查看次数

是否可以使用由 comodo 提供的免费 SSL 证书:Instant SSL?还是 StartCom 更好?

是否可以使用由 comodo提供的免费 SSL 证书Instant SSL

该网站说:

我们对您的承诺:

您的 SSL 证书绝对没有成本或承诺。

您将获得具有完整 https 功能的免费 SSL 和 90 天的免费金色挂锁

我想将它用于测试目的。

  • 用一个可以吗?
  • 有什么收获吗?
  • 以后可以转给其他证书提供者吗?
  • StartCom提供的证书有多好?因为他们是免费的,有什么问题吗?

ssl certificate ssl-certificate certificate-authority

2
推荐指数
1
解决办法
991
查看次数

攻击?日志(网络扫描)中的第二个状态代码(286、289)是什么?

今天浏览我的评估日志,我发现有很多条目试图访问页面。(不存在的)。喜欢

  • 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)

security http httpd apache-2.2

1
推荐指数
1
解决办法
2902
查看次数