Ubuntu Server Apache2 SSL виртуальный хост не работает

Я полностью настроил веб-сервер на 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>
0
задан 20 March 2014 в 12:47

3 ответа

Решение состояло в том, чтобы сначала удостовериться эти apache2.conf, включает sites-enabled папка а не sites-available папка.

Затем необходимо создать дополнительную символьную ссылку в Вашем sites-enabled папка, которая связывается с ssl файл по умолчанию, который Вы создали в sites-available папка. Наконец перезапустите apache2 сервис, и необходимо быть хорошими для движения.

0
ответ дан 20 March 2014 в 12:47

Попытайтесь поместить

Редактирование 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

0
ответ дан 20 March 2014 в 12:47

Я создал сценарий, который можно использовать, чтобы генерировать и автоматически установить Самоподписанные Сертификаты для Виртуальных конфигурационных файлов Хостов, уже созданных. Можно найти сценарий путем консалтинга с этим учебным руководством http://www.bytelinux.com/create-self-signed-certificates-enable-apache-ssl-ubuntu-14-10/ и создать сценарий удара a2sslcert на собственном сервере.

0
ответ дан 20 March 2014 в 12:47
  • 1
    Не абсолютно уверенный, что Вы подразумеваете под " запишите ISO file" – Andrew Wolfe 3 November 2018 в 03:13

Другие вопросы по тегам:

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