Chr*_*ian 133 ssl apache-httpd
当我重新启动 httpd 时,出现以下错误。我错过了什么?
[root@localhost ~]# service httpd restart
Stopping httpd: [ OK ]
Starting httpd: Syntax error on line 22 of /etc/httpd/conf.d/sites.conf:
Invalid command 'SSLEngine', perhaps misspelled or defined by a module not included in the server configuration
Run Code Online (Sandbox Code Playgroud)
我已经使用安装了 mod_ssl yum install mod_ssl openssh
Package 1:mod_ssl-2.2.15-15.el6.centos.x86_64 already installed and latest version
Package openssh-5.3p1-70.el6_2.2.x86_64 already installed and latest version
Run Code Online (Sandbox Code Playgroud)
我的sites.conf 看起来像这样
<VirtualHost *:80>
# ServerName shop.itmanx.com
ServerAdmin webmaster@itmanx.com
DocumentRoot /var/www/html/magento
<Directory /var/www/html>
Options -Indexes
AllowOverride All
</Directory>
ErrorLog logs/shop-error.log
CustomLog logs/shop-access.log
</VirtualHost>
<VirtualHost *:443>
ServerName secure.itmanx.com
ServerAdmin webmaster@itmanx.com
SSLEngine on
SSLCertificateFile /etc/httpd/ssl/secure.itmanx.com/server.crt
SSLCertificateKeyFile /etc/httpd/ssl/secure.itmanx.com/server.key
SSLCertificateChainFile /etc/httpd/ssl/secure.itmanx.com/chain.crt
DocumentRoot /var/www/html/magento
<Directory /var/www/html>
Options -Indexes
AllowOverride All
</Directory>
ErrorLog logs/shop-ssl-error.log
CustomLog logs/shop-ssl-access.log
</VirtualHost>
Run Code Online (Sandbox Code Playgroud)
Sté*_*ane 169
在许多系统(Ubuntu、Suse、Debian 等)上运行以下命令来启用 Apache 的 SSL mod:
sudo a2enmod ssl
Run Code Online (Sandbox Code Playgroud)
and*_*coz 66
可能您没有加载 ssl 模块。您应该在 apache 配置文件中的某处有一个LoadModule指令。
就像是:
LoadModule ssl_module /usr/lib64/apache2-prefork/mod_ssl.so
Run Code Online (Sandbox Code Playgroud)
通常 apache 配置模板(在任何发行版上)都有一个名为(类似)的文件loadmodule.conf
,您应该在其中找到LoadModule
在服务器启动时加载到 apache 中的每个模块的指令。
Fal*_*eni 31
在 CentOS 7 上安装包“mod_ssl”并重新启动 apache 服务器对我有用:
yum install mod_ssl
systemctl restart httpd
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
328582 次 |
最近记录: |