OS: Ubuntu 16.04
I'm trying to enable a self-signed certificate for apache. I already created the certs with the following command:
sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/ssl/private/apache-selfsigned.key -out /etc/ssl/certs/apache-selfsigned.crt
My default-ssl.conf is:
<VirtualHost _default_:443>
ServerAdmin webmaster@test.de
ServerName pvapp.test-campus.de
DocumentRoot /var/www/client/pvapp-client/dist
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
SSLEngine on
SSLCertificateFile /etc/ssl/certs/apache-selfsigned.crt
SSLCertificateKeyFile /etc/ssl/private/apache-selfsigned.key
<FilesMatch "\.(cgi|shtml|phtml|php)$">
SSLOptions +StdEnvVars
</FilesMatch>
<Directory /usr/lib/cgi-bin>
SSLOptions +StdEnvVars
</Directory>
BrowserMatch "MSIE [2-6]" \
nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0
</VirtualHost>
And the testServer.conf for the vhost is:
<VirtualHost *:80>
ServerAdmin webmaster@test.de
DocumentRoot /var/www/client/pvapp-client/dist
Redirect permanent / https://pvapp.test-campus.de
<Directory /var/www/client/pvapp-client/dist>
AllowOverride All
Order allow,deny
Allow from All
<IfModule mod_rewrite.c>
Options -MultiViews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ app.php [QSA,L]
</IfModule>
</Directory>
ErrorLog ${APACHE_LOG_DIR}/test.com-error.log
CustomLog ${APACHE_LOG_DIR}/test.com-access.log combined
</VirtualHost>
I'm redirecting to an https://.... page but can't reach the page. Without that redirect it's working on the standard IP but it's just http. Conf files are enabled with a2ensite and firewall checked.
When calling the website in chrome its responding "couldn't fine the server IP".