Я полностью настроил веб-сервер на Ubuntu с использованием SSL-шифрования. Я пытаюсь настроить файл -SSL по умолчанию, чтобы он указывал на правильные каталоги. geekychicgirls работает совершенно нормально, однако глазок всегда разрешает geekychicgirls, любая помощь приветствуется, см. код ниже.
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerAdmin webmaster@nixcraft.com
DocumentRoot "/var/www/thepeepinghole"
SSLEngine on
SSLCertificateFile /ssl/14252798.crt
SSLCertificateKeyFile /ssl/private.key
SSLCertificateChainFile /ssl/futureretrogaming.ca-bundle
ServerName www.thepeepinghole.tk
ServerAlias thepeepinghole.tk
ErrorLog "/var/www/thepeepinghole/log/error.log"
CustomLog "/var/www/thepeepinghole/log/access.log" common
<Directory /var/www/thepeepinghole>
DirectoryIndex index.html
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
</VirtualHost>
<VirtualHost *:443>
ServerAdmin webmaster@nixcraft.com
DocumentRoot "/var/www/geekychicgirls"
SSLEngine on
SSLCertificateFile /ssl/14252798.crt
SSLCertificateKeyFile /ssl/private.key
SSLCertificateChainFile /ssl/futureretrogaming.ca-bundle
ServerName www.geekychicgirls.tk
ServerAlias geekychicgirls.tk
ErrorLog "/var/www/geekychicgirls/log/error.log"
CustomLog "/var/www/geekychicgirls/log/access.log" common
<Directory /var/www/geekychicgirls>
DirectoryIndex index.html
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
</VirtualHost>
</IfModule>
Попытайтесь поместить
Редактирование NameVirtualHost *:443
<IfModule mod_ssl.c>
NameVirtualHost *:443
<VirtualHost *:443>
ServerAdmin webmaster@nixcraft.com
DocumentRoot "/var/www/thepeepinghole"
SSLEngine on
...
1
, Только я могу сказать: теперь попробуйте что-то совершенно другое.
Редактирование/etc/apache2/ports.conf и добавляют следующую строку:
Listen 443
Также комментируют следующее в/etc/apache2/ports.conf:
<IfModule mod_ssl.c>
# SSL name based virtual hosts are not yet supported, therefore no
# NameVirtualHost statement here
Listen 443
</IfModule>
Создают файл, названный/etc/apache2/ssl.conf, и вставляют все из Вашего отправленного рассматриваемого файла без в начале и в конце.
<VirtualHost *:443>
ServerAdmin webmaster@nixcraft.com
DocumentRoot "/var/www/thepeepinghole"
SSLEngine on
SSLCertificateFile /ssl/14252798.crt
SSLCertificateKeyFile /ssl/private.key
SSLCertificateChainFile /ssl/futureretrogaming.ca-bundle
ServerName www.thepeepinghole.tk
ServerAlias thepeepinghole.tk
ErrorLog "/var/www/thepeepinghole/log/error.log"
CustomLog "/var/www/thepeepinghole/log/access.log" common
<Directory /var/www/thepeepinghole>
DirectoryIndex index.html
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
</VirtualHost>
<VirtualHost *:443>
ServerAdmin webmaster@nixcraft.com
DocumentRoot "/var/www/geekychicgirls"
SSLEngine on
SSLCertificateFile /ssl/14252798.crt
SSLCertificateKeyFile /ssl/private.key
SSLCertificateChainFile /ssl/futureretrogaming.ca-bundle
ServerName www.geekychicgirls.tk
ServerAlias geekychicgirls.tk
ErrorLog "/var/www/geekychicgirls/log/error.log"
CustomLog "/var/www/geekychicgirls/log/access.log" common
<Directory /var/www/geekychicgirls>
DirectoryIndex index.html
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
</VirtualHost>
Включают включать строку в/etc/apache2/apache2.conf:
Include "/etc/apache2/ssl.conf"
Перезапуск Apache2 с: перезапуск apache2ctl
Решение состояло в том, чтобы сначала удостовериться эти apache2.conf
, включает sites-enabled
папка а не sites-available
папка.
Затем необходимо создать дополнительную символьную ссылку в Вашем sites-enabled
папка, которая связывается с ssl
файл по умолчанию, который Вы создали в sites-available
папка. Наконец перезапустите apache2 сервис, и необходимо быть хорошими для движения.
sudo a2ensite <your_site_file_name_in_sites-available>
– Robi Kumar Tomar
17.05.2020, 00:00