E
E
EVOSandru62016-08-03 13:26:37
LAMP
EVOSandru6, 2016-08-03 13:26:37

How to log in locally to a local site in ubuntu with an SSL certificate?

Good afternoon, I did everything according to the

link help.ubuntu.ru/wiki/apache2 as it is written in the section
Configuring HTTPS in Apache . Namely:

openssl req -new -x509 -days 30 -keyout server.key -out server.pem
cp server.key{,.orig}
openssl rsa -in server.key.orig -out server.key
rm server.key.orig
sudo cp server.pem /etc/ssl/certs/
sudo cp server.key /etc/ssl/private/
sudo chmod 0600 /etc/ssl/private/server.key
sudo a2enmod ssl
sudo a2ensite default-ssl


/etc/apache2/sites-enabled/default-ssl.conf


SSLEngine on
SSLProtocol all -SSLv2
# Публичный сертификат сервера
SSLCertificateFile    /etc/ssl/certs/server.pem
# Приватный ключ сервера
SSLCertificateKeyFile /etc/ssl/private/server.key


/etc/apache/site-available/vk_game.loc

<VirtualHost *:80>
        ServerName vk_game.loc
        ServerAdmin [email protected]
        ServerAlias www.vk_game.loc
        DocumentRoot /var/www/vk_game.loc/public_html
        CustomLog ${APACHE_LOG_DIR}/vk_game.loc.access.log combined
        ErrorLog ${APACHE_LOG_DIR}/vk_game.loc.error.log
         DirectoryIndex index.php index.php4 index.php3 index.cgi index.pl index.html index.htm index.shtml index.phtml
        <Directory /var/www/vk_game.loc/public_html>
                Options -Includes -Indexes -ExecCGI
                Options Indexes FollowSymLinks MultiViews
                AllowOverride All
                Order deny,allow
                Allow from All
        </Directory>
</VirtualHost>


And restarted Apache

I'm sitting on kubuntu myself. I go to the address: https ://vk_game.loc/ and I open - Apache2 Ubuntu Default Page It works! http
: //vk_game.loc displays the correct content. Please tell me what could be the problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Belyaev, 2016-08-03
@EVOSandru6

There is no virtual host on port 443, so Apache gives the default

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question