![]() ![]() ![]() Go to apache/conf/extra/httpd-ssl.cfg and edit this file:.Rename the private.key to server.key and copy it to xampp/apache/conf/ssl.key.Rename the certificate.crt to server.crt and copy it to xampp/apache/conf/ssl.crt.ca_bundle.crt, certificate.crt and private.key Unzip the file in your /apache/conf folder.if OK, you can download your certificate files, below the 3 text fields full of letters and numbers is a download button.Wait for a few seconds, then verify if the txt records are OK.Go to your domain DNS management and add the txt records as requested.Select your verify method, and choose to add txt records to your domain.Enter your website, and click on 'Generate Free SSL certificate'.Enable port 80 and 443 to your servers IP and have TCP en UPD rules both enabled. Setup the appropriate rules in your router for this. The virtual hosts should now work with HTTPS and any references to HTTP will be redirected to HTTPS.If you need to add a Free SSL to your XAMPP install (windows), this is a small tutorial on how to do this:įirst, you need to make sure your firewall resolves port 80 and 443. Once the new configuration has been saved, stop and start Apache (using the XAMPP Control Panel). SSLCertificateKeyFile “C:\Apps\xampp\apache\conf\ssl.key\website1-selfsigned.key” SSLCertificateFile “C:\Apps\xampp\apache\conf\ssl.crt\website1-selfsigned.crt” ![]() SSLCertificateKeyFile “C:\Apps\xampp\apache\conf\ssl.key\localhost-selfsigned.key” SSLCertificateFile “C:\Apps\xampp\apache\conf\ssl.crt\localhost-selfsigned.crt” SSLCertificateKeyFile “conf/ssl.key/localhost-selfsigned.key”Ĭhange each of the virtual host definitions to enable HTTPS. SSLCertificateFile “conf/ssl.crt/localhost-selfsigned.crt” Find these two parameters in the file and change them to use the self-signed certificate. Configure ApacheĬhange the default SSL settings in xampp\apache\conf\extra\nf. Keep this script as these certificates will expire in 365 days, when you will need to create them again. Note that in the subj only the /CN=xxxxx part is actually required the rest is just recorded in the certificate to be displayed if required. Openssl req -subj “/C=AU/ST=Victoria/L=Port Melbourne/O=Paul Shipley/OU= /CN=website1.local” -x509 -nodes -days 365 -newkey rsa:2048 -keyout %HOME%\ssl.key\website1-selfsigned.key -out %HOME%\ssl.crt\website1-selfsigned.crt Openssl req -subj “/C=AU/ST=Victoria/L=Port Melbourne/O=Paul Shipley/OU= /CN=localhost” -x509 -nodes -days 365 -newkey rsa:2048 -keyout %HOME%\ssl.key\localhost-selfsigned.key -out %HOME%\ssl.crt\localhost-selfsigned.crt If not exist %HOME%\ssl.key mkdir %HOME%\ssl.key If not exist %HOME%\ssl.crt mkdir %HOME%\ssl.crt I have installed XAMPP in C:\Apps\xampp – change this to suit your own configuration. The first step is to create the self-signed certificates using the openssl package which is included as part of XAMPP in xampp\apache\bin (I am assuming this is in the PATH, otherwise use the fully qualified command path). Options Indexes FollowSymLinks Includes ExecCGI The hosts file maps these back to the localhost (127.0.0.1).Įach of the virtual hosts are defined in xampp\apache\conf\extra\nf as:ĭocumentRoot “C:\Users\shipl\htdocs\website1” These are in the form: website1.local, website2.local, etc. I am using several virtual hosts for my projects. I am currently working towards migrating all of the sites I support to HTTPS, starting with my development environment, which is using Windows 10 and XAMMP. There is an initiative, lead by Google and Mozilla, to deprecate HTTP and migrate all web traffic to HTTPS. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |