为SSL配置Httpd

时间:2015-07-06 21:34:00

标签: apache ssl https httpd.conf

我在尝试了将近4小时和无休止的谷歌搜索后写这篇文章。

在我的httpd.config文件中添加433虚拟端口后,我收到此错误 “无效命令'SSLEngine',可能拼写错误或由服务器配置中未包含的模块定义”

这是我对httpd.config

的补充
<VirtualHost *:443>
SSLEngine on                                                                
SSLProtocol all -SSLv2                                                      
SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM                

SSLCertificateFile /path/unified.crt                           
SSLCertificateKeyFile /path/my-private-decrypted.key                        
SSLCertificateChainFile /path/sub.class1.server.sh2.ca.pem 
ServerAdmin root@localhost

DocumentRoot /var/www/html
<Directory />
    Options FollowSymLinks
    AllowOverride None
</Directory>
<Directory /var/www/html>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    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 ${APACHE_LOG_DIR}/error.log

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn

CustomLog ${APACHE_LOG_DIR}/access.log combined

Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
    Options Indexes MultiViews FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
    Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>

我完全糊涂了!请任何人帮忙!谢谢 !

1 个答案:

答案 0 :(得分:1)

最后,修好了!

在httpd run中启用ssl:

sudo yum install mod24_ssl