Использование SSL-сертификата приводит к ERR_ADDRESS_UNREACHABLE в Ubuntu с Apache2 - PullRequest
0 голосов
/ 06 мая 2018

Пытался использовать сертификат и ключ ssl, которые я получил от своего провайдера, но он не работает. Когда я хочу подключиться к своему сайту, я получаю ERR_ADDRESS_UNREACHABLE в Google Chrome.

enter image description here

Вот мой Apache Config для веб-сайта.

    <VirtualHost *:80>
            ServerName example.com
            ServerAlias *.example.com

            ServerAdmin me@example.com
            DocumentRoot /var/www/example.com/public

            Redirect "/" "https://example.com/"

            ErrorLog ${APACHE_LOG_DIR}/example.com.error.log
            CustomLog ${APACHE_LOG_DIR}/example.com.access.log combined
    </VirtualHost>

    <IfModule mod_ssl.c>
            <VirtualHost *:443>
                    ServerName example.com
                    ServerAlias *.example.com

                    ServerAdmin me@example.com
                    DocumentRoot /var/www/example.com/public

                    SSLEngine on

                    SSLCertificateFile      /etc/ssl/certs/example.com.crt
                    SSLCertificateKeyFile   /etc/ssl/private/example.com.key

                    <Directory /var/www/example.com/>
                            Options Indexes FollowSymLinks MultiViews
                            AllowOverride All
                            Order allow,deny
                            allow from all
                            <Limit POST PUT DELETE>
                                    Require all granted
                            </Limit>
                    </Directory>

                    ErrorLog ${APACHE_LOG_DIR}/example.com.error.log
                    CustomLog ${APACHE_LOG_DIR}/example.com.access.log combined
            </VirtualHost>
    </IfModule>

Я также гарантировал, что брандмауэр разрешает соединения https.

enter image description here

Что мне здесь не хватает?

1 Ответ

0 голосов
/ 16 мая 2018

Хорошо, так странно, что ssl / https / port 443 действительно НЕ был включен на моем сервере. Не знаю, почему все говорит мне, что https включен, но вот как я мог решить это для меня.

iptables -I INPUT -p tcp --dport 443 -j ACCEPT
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...