Hi,
My be someone can help me to figure out what's wrong with my configuration.
I'm tring to configure an https domain with a Self-Signed Certificate. After mainy different configs I still receive this error:
RSA server certificate CommonName (CN) `localhost' does NOT match server name!?
Strange I supress every where '`localhost' !
My comon name match my website address. I did a check with openssl x509 -subject -in /etc/ssl/certs/server.crt
To install and generate the certificate I did:
openssl genrsa -des3 -out server.key 1024
openssl req -new -key server.key -out server.csr
openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
sudo cp server.crt /etc/ssl/certs
(FYI: here the prompt says "cp: `server.crt' and `/etc/ssl/certs/server.crt' are the same file" I'mnot sure what that means?)
sudo cp server.key /etc/ssl/private
What I have at this stage as as configuration is:
I'm on Ubuntu 9.10 with Apache 2.
My hosts file is:
127.0.0.1 myHostName localhost
myLinodeIp myHostName.MyWebSIte.com myHostName
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
I have as a hostname: myHostName
My ports.conf is:
NameVirtualHost myIpAddress:80
Listen 80
<IfModule mod_ssl.c>
# SSL name based virtual hosts are not yet supported, therefore no
# NameVirtualHost statement here
Listen myPort
</IfModule>
My ssl Virtual hosts
NameVirtualHost myIp:myPort
<IfModule mod_ssl.c>
<VirtualHost myIp:myPort>
ServerName
https://myDomain.com:myPort
DocumentRoot /srv/www/myDomain.com/public_html
<Directory "/srv/www/ssl. myDomain.com/public_html">
Options FollowSymLinks
AllowOverride None
</Directory>
LogLevel warn
CustomLog /var/log/apache2/ssl_access.log combined
SSLEngine on
SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
SSLCertificateChainFile /etc/ssl/certs/server.crt
SSLCACertificateFile /etc/ssl/certs/server.crt
<FilesMatch "\.(cgi|shtml|phtml|php)$">
SSLOptions +StdEnvVars
</FilesMatch>
<Directory /usr/lib/cgi-bin>
SSLOptions +StdEnvVars
</Directory>
BrowserMatch ".*MSIE.*" \
nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0
</VirtualHost>
</IfModule>
Any thoughts.
Thanks alot.
Jean