Я настроил ssl на моем сайте teampass на моем тестовом сервере. Я не вижу буквы «s» в https://teampass.domain.org

Когда я пытаюсь навестить У меня есть доступ к сайту, но я не вижу буквы «S» в https: //

. Я выполнил

  1. apachectl configtest

  2. apachectl stop

  3. apachectl start

  4. a2ensite default-ssl .conf

  5. a2ensite teampass.conf

  6. /etc/init.d/apache2 restart

Я настроил свой виртуальный хост в /etc/apache2/sites-available/default-ssl.conf :

<VirtualHost *:443>
        ServerAdmin webmaster@localhost
        ServerName teampass.domain.org
        Serveralias www.teampass.domain.org
        DocumentRoot /var/www/html/teampass

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
        SSLEngine on

        SSLCACertificateFile /etc/apache2/ssl/DigiCertCA
        SSLCertificateFile /etc/apache2/ssl/star_domain_org
        SSLCertificateKeyfile /etc/apache2/ssl/teampass.key
</VirtualHost>

это мой /etc/apache2/sites-available/teampass.conf

<VirtualHost *:80>
    Redirect permanent / https://teampass.domain.org/
    ServerAdmin webmaster@localhost
    ServerName teampass.domain.org
    ServerAlias www.teampass.domain.org
    DocumentRoot /var/www/html/teampass
    <Directory /var/www/html/teampass>
            AllowOverride All
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

    SSLEngine on
    SSLCACertificateFile /etc/apache2/ssl/DigiCertCA
    SSLCertificateFile /etc/apache2/ssl/star_domain_org
    SSLCertificateKeyfile /etc/apache2/ssl/teampass.key
</VirtualHost>


<VirtualHost *:443>
        ServerAdmin webmaster@localhost
        ServerName teampass
        ServerAlias www.teampass.domain.org
        DocumentRoot /var/www/html/teampass

        SSLCertificateFile /etc/apache2/ssl/star_domain_org
        SSLCertificateKeyfile /etc/apache2/ssl/teampass.key
        SSLCACertificateFile /etc/apache2/ssl/DigiCertCA
        SSLEngine on
        ErrorLog ${APACHE_LOG_DIR}/teampass_error.log
        CustomLog ${APACHE_LOG_DIR}/teampass_access.log combined

        <IfModule mod_rewrite.c>
                # DO NOT REMOVE
                RewriteOptions Inherit
        </IfModule>
</VirtualHost>

Это мой /etc/apache2/ports.conf

Listen 80
<IfModule ssl_module>
        Listen 443 http
</IfModule>

<IfModule mod_gnutls.c>
        listen 443 http
</IfModule>
-1
задан 24 November 2015 в 13:38
1 ответ

В вашем port.conf измените

Listen 80
<IfModule ssl_module>
        Listen 443 http
</IfModule>

<IfModule mod_gnutls.c>
        listen 443 http
</IfModule>

на

Listen 80
<IfModule ssl_module>
        Listen 443
</IfModule>

По умолчанию 443 уже https , если вы установите http сразу после этого, сервер http контент на порту 443

Это необходимая конфигурация:

/etc/apache2/sites-available/default-ssl.conf:

<VirtualHost *:443>
        ServerAdmin webmaster@localhost
        ServerName teampass.domain.org
        Serveralias www.teampass.domain.org
        DocumentRoot /var/www/html/teampass

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
        SSLEngine on

        SSLCACertificateFile /etc/apache2/ssl/DigiCertCA
        SSLCertificateFile /etc/apache2/ssl/star_domain_org
        SSLCertificateKeyfile /etc/apache2/ssl/teampass.key
</VirtualHost>

/ etc / apache2 / sites-available /teampass.conf[12100 visible

0
ответ дан 5 December 2019 в 20:31

Теги

Похожие вопросы