😃Mẹo hướng dẫn cấu hình SSL trên localhost cho XAMPP full có cả xác thực ssl, https (ok)
https://wiki.ngoisaoso.vn/May-chu/meo-huong-dan-cau-hinh-ssl-tren-localhost-cho-xampp-329.html
Sử dụng next.js để tạo ssl trên local sau đó copy sử dụng cho xampp

<VirtualHost example.com:443>
DocumentRoot "C:\xampp82\htdocs\example"
ServerName example.com
ServerAlias *.example.com
SSLEngine on
SSLCertificateFile "C:/xampp82/htdocs/example/certificates/localhost.crt"
SSLCertificateKeyFile "C:/xampp82/htdocs/example/certificates/localhost-key.key"
</VirtualHost>Một số file làm sẵn đưa lên đây để sử dụng


index.php



Error Xampp Access Forbidden php 😂

Full
Chú ý: Để nó chuyển từ http đến htttps ta có :)
C:\xampp\htdocs\blog\public.htaccess
Full remove index.php public && http to https
C:\xampp\htdocs\blog\public.htaccess
Đã thực hiện thành công theo videos :)))
https://drive.google.com/file/d/1ulLGJv-HVN0ucCltCO8mX_jrBA7dANl5/view?usp=sharing
2 files cần chỉnh sửa th eo dạng này :)

C:\xampp\apache\https.ext
C:\xampp\apache\conf\extra\httpd-xampp.conf

Kết quả:

Mẹo hướng dẫn cấu hình SSL trên localhost cho XAMPP
Bài viết này sẽ hướng dẫn cách bạn tạo chứng chỉ SSL cục bộ được sử dụng trong XAMPP trên Windows.
Trong bài viết này sẽ sử dụng tên miền ảo làm ví dụ là site.test
1. VÀO THƯ MỤC APACHE TRONG XAMPP.
Mặc định XAMPP đợc cài đặt trong thư mục C:\xampp\apache.
2. TẠO MỘT THƯ MỤC MỚI.
Đây là nơi ta sẽ lưu trữ chứng chỉ SSL. Trong ví dụ này Ngôi Sao Số sẽ tạo thư mục crt ,Vì vậy, đường dẫn sẽ có dạng C:\xampp\apache\crt
3. TẢI VỀ VÀ THÊM 2 TẬP TIN NÀY VÀO THƯ MỤC VỪA TẠO
Vào đường dẫn sau tải 2 tập tin cert.conf make-cert.bat về. 2 tập tin này sẽ dùng để tạo chứng chỉ SSL cho tên miền tùy thích.
4. SỬA CERT.CONF VÀ CHẠY MAKE-CERT.BAT
Mở file cert.conf và thay đổi {{DOMAIN}} thành tên miền bạn muốn, trong trường hợp này site.test và lưu lại.
Nhấp đúp chuột vào make-cert.bat và nhập tên miền site.test khi được nhắc. Và nhập trả lời cho các câu hỏi khác, thiết lập mặc định có sẵn trong cert.conf

5. CÀI ĐẶT CHỨNG CHỈ TRONG WINDOWS.
Sau đó, bạn sẽ thấy thư mục site.test được tạo. Trong thư mục đó ta sẽ có server.crt and server.key. Đây là chứng chỉ SSL certificate.
Nhấp đúp chuột vào server.crt để cài đặt nó trên Windows để Windows chấp nhận chứng chỉ này.
Và chọn Local Machine trong Store Location.
Tiếp tục chọn “Place all certificate in the following store” và click browse sau đó chọn Trusted Root Certification Authorities.
Chọn Next và Finish.
Và bây giờ chứng chỉ này đã được cài đặt là tin cậy (trusted) trong Windows. Tiếp theo là làm thế nào để sử dụng chứng chỉ này trong XAMPP.
6. THÊM TRANG WEB TRONG MÁY CHỦ WINDOWS
Mở notepad với quyền administrator.
Sửa C:\Windows\System32\drivers\etc\hosts
Thêm một dòng mới:
Điều này sẽ giúp XAMPP khi truy cập http://site.test sẽ trỏ tên miền này về IP localhost
7. THÊM TÊN MIỀN NÀY VÀO FILE CONF CỦA XAMPP.
Giờ bạn cần kích hoạt SSL cho tên miền này và cho XAMPP biết nơi lưu trữ Chứng chỉ SSL. Vì vậy, bạn cần chỉnh sửa C:\xampp\apache\conf\extra\httpd-xampp.conf
Và thêm dòng mới này dưới cùng:
Sau đó, bạn sẽ cần khởi động lại Apache trong XAMPP. Đơn giản, chỉ cần mở Bảng điều khiển XAMPP và bấm stop và start tại mục Apache. Mẹo: Trong file conf XAMPP, bạn có thể thay đổi thư mục gốc cho từng tên miền nếu cần.
8. KHỞI ĐỘNG LẠI TRÌNH DUYỆT VÀ THỬ LẠI!
Cần khởi động lại trình duyệt để hệ thống tải chứng chỉ. Và truy cập tên miền trên trình duyệt của bạn, và bạn sẽ thấy khóa màu xanh lá như hình bên dưới!

Ngôi Sao Số hy vọng hướng dẫn này hữu ích!
9. Setting a Local Development Environment for Laravel on Windows | Install Laravel on Windows
Setting a Local Development Environment for Laravel on Windows | Install Laravel on Windows
Many developers use Windows for PHP projects, we will cover a basic XAMPP Setup for a Laravel project. Following these easy steps will help you run your PHP projects and install Laravel on Windows in a matter of minutes.
Installing XAMPP for Laravel
Download XAMPP for Windows from their official site: https://www.apachefriends.org/download.html
For our example, we’ve chosen PHP 7.1 and XAMPP 32 bit
Run the installer and select Apache, MySQL and phpMyAdmin
It’s recommended to make the installation in C:\ to avoid issues with Windows User permissions (or the drive where your Windows is installed)
After it’s complete do not start anything just yet.
Setting PHP from Windows CMD
Open Advanced System Settings (System Properties -> Advanced)
Open Environment Variables
On the top window select Path and click on Edit
In the new window click on New
We need to enter the path to XAMPP’s PHP
We will also add MySQL’s Path, click on New again and enter
Composer from Windows CMD
Download Composer’s Windows .exe installer: https://getcomposer.org/download/
Place the installer and run it from the added to Path directory – C:\xampp\php
Now that we have Apache, PHP, MySQL and Composer installed, we’re ready to install Laravel, set a Virtual Host with a custom domain for local development. XAMPP’s Apache uses the htdocs folder for serving HTTP requests, we’ll set our custom Laravel Virtual Host under C:\xampp\htdocs\example\ which will be opened locally from example.com
Install Laravel on Windows with Composer
Open Window’s CMD or PowerShell
Install Laravel using Composer
Creating MySQL Database for Laravel
Open the CMD or PowerShell again
Access the MySQL CLI
Create Database for Laravel
Setting Laravel’s .env file
Navigate to C:\xampp\htdocs\example
Open the config/database.php file and edit the MySQL Connection settings
Virtual Host with XAMPP
Navigate to C:\xampp\apache\conf\extra
Open httpd-vhosts.conf and append:
Enable mod_rewrite for Laravel
Open the httpd.conf file in C:\xampp\apache\conf\extra
Look for LoadModule rewrite_module modules/mod_rewrite.so and remove the ; at the start
Setting local domain with hosts file
Navigate to c:\Windows\System32\Drivers\etc
Open the hosts file with Administrator Privileges
Append the line at the bottom
Start Apache and MySQL, your local Laravel project will be opened from example.com and you’re ready to start working on it. When ready you can contact us to have it deployed on a WebHostFace server
You can benefit from a fast and reliable SSD Laravel Hosting with our shared hosting services. Now with a greatly discounted price! Start your new Laravel project on a professionally set hosting environment without investing a large amount of money and grow your online presence!
Last updated
Was this helpful?
