If you have a 400 bad request when installing SSL on Ubuntu Dapper Drake (virtual host configuration) then maybe the following may help you.
Check your virtual host apache file located at
/etc/apache2/sites-enabled/your-virtualhost-file
If it has the following syntax it may not work as you intended…
<VirtualHost your.site.ip.address:80 your.site.ip.address:443> any other configuration in here SSLCertificateFile path-to-your-cert-file.cert SSLCertificateKeyFile path-to-your-cert-keyfile.key </VirtualHost>
The above syntax may give you a 400 bad request and only lets you access your website via the SSL port 443 and not the normal http port 80. You will porbably see the following error when accessing your website.
Your browser sent a request that this server could not understand.
Reason: You’re speaking plain HTTP to an SSL-enabled server port.
Instead use the HTTPS scheme to access this URL, please.
Obviously you want requests to both ports to work. Try the following syntax to correct this problem.
<VirtualHost your.site.ip.address:80> any other configuration in here </VirtualHost> <VirtualHost your.site.ip.address:443> any other configuration in here SSLCertificateFile path-to-your-cert-file.cert SSLCertificateKeyFile path-to-your-cert-keyfile.key </VirtualHost>
Hopefully, with abit of luck, this should correct your problem.
Tags: apache, ubuntu, dapper drake, 400 Bad request, SSL, Mod SSL, Open SSL, Fasthosts