在带有错误未定义符号的a2enmod ssl之后,mod_ssl无法在apache重新启动时加载:ap_map_http_request_error

时间:2016-04-13 04:37:50

标签: apache ubuntu ssl

我无法让我的apache2实例在https上运行。

我有一个正在运行的网站,可以在http上使用几个别名。我安装了自签名证书并将条目添加到conf文件中。到目前为止一切都很好。

此时apache2ctl configtest说好了。

我运行a2enmod ssl并启用ssl

apache2ctl configtest或service apache2 restart都失败并显示此错误

/etc/apache2/apache2.conf第140行的语法错误:/etc/apache2/mods-enabled/ssl.load的第2行语法错误:无法加载/ usr / lib / apache2 / modules / mod_ssl。所以进入服务器:/usr/lib/apache2/modules/mod_ssl.so:未定义的符号:ap_map_http_request_error 动作'configtest'失败。

验证mod_ssl.so是否在指定的路径中 验证启用了站点的文件中的ln是否正确 证书文件存在于指定的路径

我的ssl conf文件如下所示:

<IfModule mod_ssl.c>
    Listen 443
    <VirtualHost *:443>
            SSLEngine on
            SSLCertificateFile      /etc/apache2/ssl/server.crt
            SSLCertificateKeyFile /etc/apache2/ssl/server.key

            ServerName www.myserver.com
            ServerAdmin webmaster@localhost
            DocumentRoot /var/www/html

          <FilesMatch "\.(cgi|shtml|phtml|php)$">
                            SSLOptions +StdEnvVars
            </FilesMatch>
            <Directory /usr/lib/cgi-bin>
                            SSLOptions +StdEnvVars
            </Directory>
            BrowserMatch "MSIE [2-6]" \
                            nokeepalive ssl-unclean-shutdown \
                            downgrade-1.0 force-response-1.0
            # MSIE 7 and newer should be able to use keepalive
            BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown

    </VirtualHost>
</IfModule>

我该如何解决这个问题?

0 个答案:

没有答案