我需要在 Apache 上设置我的 VirtualHost 以在 http 和 https 上提供服务(使用标准端口)
如果我启用 SSL 引擎(如下所示) - 在端口 80 上出现错误。
原因是,站点的某些部分需要 SSL,但其他部分不需要。我怎样才能在网站上同时提供 http + https 服务?
这是我的虚拟主机文件....
NameVirtualHost *
<VirtualHost *>
ServerAdmin webmaster@localhost
ServerName mysite.co.uk
DocumentRoot /var/www/mysite/public
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/mysite/public>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog /var/log/apache2/error.log
# Possible values include: debug, info, notice, …Run Code Online (Sandbox Code Playgroud) 我正在尝试使用 apache 在 Fedora 上设置 SSL。
在我的虚拟主机...
SSLCertificateFile /your/path/to/crt.crt
SSLCertificateKeyFile /your/path/to/key.key
SSLCertificateChainFile /your/path/to/DigiCertCA.crt
Run Code Online (Sandbox Code Playgroud)
我使用自签名密钥可以正常工作,但无法使其与 DigiCertCA crt 一起使用。
当我跑
service httpd restart
Run Code Online (Sandbox Code Playgroud)
它无法启动。这是我在日志中得到的...
[Sat Jan 29 07:57:13 2011] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suex$
[Sat Jan 29 07:57:13 2011] [error] Failed to configure CA certificate chain!
Run Code Online (Sandbox Code Playgroud)
任何帮助将不胜感激!
我的 SSL 证书收到警告 - 它说它是自签名的并且不受信任,而且它属于不同的域,但我是从 DigiCert 购买的。
奇怪的是它显示...
OU = SomeOrganizationalUnit
O = SomeOrganization
L = SomeCity
S = SomeState
Run Code Online (Sandbox Code Playgroud)
...作为查看证书时的参数。我没有选择这些中的任何一个,有什么我遗漏的吗?
我正在使用 apache/openssl