![]() ![]() Ie remove the semi colon ( ) in front of the line The 6 Step Processįor the SSL we are going to use openssl, so we need to make sure that the openssl line is not commented out. As such these instructions work for when you have your web content in the default htdocs folder and are just using localhost to access all web content. Note: I run a whole lot of WordPress instances but I use localhost to access them, ie I use say so I don’t have virtual hosts setup to access it like. I was unable to find any such instructions on the Apache Friends website, so after reading a little, I muddled through and this is what I did for my setup on Windows. It therefore became necessary for me to work out how to setup a self-signed SSL certificate for localhost with my XAMPP install on Windows. SSLCertificateFile "(your drive)\xampp\apache\conf\ssl.crt\SSLCertificateKeyFile "(your drive)\xampp\apache\conf\ssl.Often it is necessary to be able to test with SSL in a development environment, as sometimes things just wont work without SSL, especially now that some browsers such as Chrome are becoming more insistent on security being done properly. Then, add the SSL virtualhost to the (your drive)\xampp\apache\conf\extra\nf like this: (remove the entires of in that file, they cause an error!) Copy the certificate and key to your XAMPP installation, in apache\conf, ssl.crt and ssl.key Thats it, now you have a valid certificate for testing.dom. Now, create the certificate and sigh it with your root certificateĬode: Select all x509 -req -days 360 -in -CA myrootca.crt -CAkey myrootca.key -CAcreateserial -out -sha256 (Fill out all the fields, your FQDN must be testing.dom, dont use a password) Now you need to create a CSR (certificate signing request), type:Ĭode: Select all req -new -sha256 -key -out -sha256 Now you have to generate a certificate and private key for your domain with OpenSSL and you have to sign this certificate with your new root certificate. Double click it, click Install Certificate, and choose this location: Trusted Root Certificate Authorities Store (All files will be located in the bin directory) You will be prompted with various details, just enter what it asks. This will be your private key for the root certificate.Ĭode: Select all req -new -x509 -days 1826 -key myrootca.key -out myrootca.crt Open OpenSSL command prompt (enter openssl, enter), and type:Ĭode: Select all genrsa -out myrootca.key 4096 Then, you first need to generate a root certificate. ![]() Now the tricky part, getting SSL to work with that domain.įot this, you need to install OpenSSL for Windows. ServerAlias ErrorLog "logs/CustomLog "logs/common ![]() ServerAdmin "(your drive)\xampp\htdocs\ServerName testing.dom (If you want it the easy way, you can generate a valid certificate at, it saves you installling and working with OpenSSL)įirst, add the domain to your Windows Hosts file, like:Ĭode: Select all 127.0.0.1 Then, add the domain to your virtual host conf (\xampp\apache\conf\extra\nf): (I am on Windows, but a similar approach will work on other operating systems) If you, like me, want to use working (SSL) virtual domains with XAMPP, you need to do the following: ![]() Using valid SSL virtual domains with XAMPP - tutorial ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |