Когда я пытаюсь навестить У меня есть доступ к сайту, но я не вижу буквы «S» в https: //
. Я выполнил
apachectl configtest
apachectl stop
apachectl start
a2ensite default-ssl .conf
a2ensite teampass.conf
/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>
В вашем 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