View Full Version : [SOLVED] Apache2 SSL dropping "www" from FQDN

April 27th, 2012, 09:02 PM
So, I have a site. www.kinnee.net that I'm trying to get SSL setup on. SSL is working, but it's complaining about the cert because the host name doesn't match. If I hit http://www.kinnee.net it's redirecting to https as it's supposed to but it's going to https://kinnee.net NOT https://www.kinnee.net like I want it to.


<VirtualHost *:80>
DocumentRoot /var/www/

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
<VirtualHost *:443>
ServerAdmin erick@kinnee.net

DocumentRoot /var/www/
SSLEngine on
SSLOptions +StrictRequire
SSLCertificateChainFile /etc/ssl/kinnee.net.ca-bundle
<Directory />
Options FollowSymLinks
AllowOverride None
SSLProtocol -all +TLSv1 +SSLv3

SSLSessionCacheTimeout 600

SSLCertificateFile /etc/ssl/kinnee.net.crt
SSLCertificateKeyFile /etc/ssl/kinnee.net.key

SSLVerifyClient none
SSLProxyEngine off

<IfModule mime.c>
AddType application/x-x509-ca-cert .crt
AddType application/x-pkcs7-crl .crl

SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown downgrade-1.0 force-response-1.0
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all

ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all

ErrorLog ${APACHE_LOG_DIR}/error.log

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn

CustomLog ${APACHE_LOG_DIR}/access.log combined

Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from ::1/128


April 27th, 2012, 09:04 PM
Ok, I just fixed it. Seems it was a setting within WordPress. Had to change the server address there to www.kinnee.net.

April 27th, 2012, 09:11 PM

Thanks for marking as solved
Glad to see you worked it out