Yayınımız yeniliklerle beraber yeni sitemizden devam ediyor. Seditio.com.tr takip edin.
Chrome browser updates has become a burden for local development. Not only they decided to disable .dev domain for local development, they also really have specific configuration in SSL Cert to show the site as secure.
In this step by step tutorial I will try to explain the walk-through to create SSL cert locally to be used in XAMPP in Windows.
In my XAMPP install I basically have a clone to all the site that I managed. And All of them (of course) use SSL/HTTPS.
Here’s the step by step guide:
In this step we are going to crate SSL and setup “site.test” website.
In regular install it’s in C:\xampp\apache.
This is where we will store our cert. In this example I will create “crt” folder. So we will have C:\xampp\apache\crt
Change {{DOMAIN}} text using the domain we want to use, in this case site.test and save.
Double click the make-cert.bat and input the domain site.test when prompted. And just do enter in other question since we already set the default from cert.conf.
Note: I don’t know how to do text replace in .bat script, if you do, let me know in the comment how to do it and I will update make-cert.bat to automatically replace the {{DOMAIN}} with the domain input.
After that, you will see site.test folder created. In that folder we will have server.crt and server.key. This is our SSL certificate.
Double click on the server.crt to install it on Windows so Windows can trust it.
And then select Local Machine as Store Location.
And then Select “Place all certificate in the following store” and click browse and select Trusted Root Certification Authorities.
Click Next and Finish.
And now this cert is installed and trusted in Windows. Next is how how to use this cert in XAMPP.
127.0.0.1 site.test
This will tell windows to load XAMPP when we visit http://site.test You can try and it will show XAMPP dashboard page.
We need to enable SSL for this domain and let XAMPP know where we store the SSL Cert. So we need to edit C:\xampp\apache\conf\extra\httpd-xampp.conf
And add this code at the bottom:
After that, you will need to restart Apache in XAMPP. It’s very simple, simply open XAMPP Control Panel and Stop and re-Start Apache Module.
Tips: In XAMPP conf, as you can see you can change the domain root directory if needed. Eg. as sub-dir in htdocs.
This is required to load the certificate. And visit the domain on your browser, and you will see green lock!
I hope this tutorial is useful!
Xampp Important! Because an activated User Account Control (UAC) Çözümü | 2117 | 2021-06-23 |
Güzellik & Klinik İçin Web Tasarımı | 1696 | 2020-11-06 |
MySQL'de AUTO_INCREMENT nasıl sıfırlanır? | 7273 | 2022-07-22 |
Telegram bot API nasıl alınır? | 1414 | 2021-01-15 |
PHP'de Timeline Nasıl Oluşturulur | 1739 | 2020-11-28 |