[ req ]default_bits = 2048default_keyfile = server-key.pemdistinguished_name = subjectreq_extensions = req_extx509_extensions = x509_extstring_mask = utf8only[ subject ]countryName = Country Name (2 letter code)countryName_default = VNstateOrProvinceName = State or Province Name (full name)stateOrProvinceName_default = learninglocalityName = Locality Name (eg, city)localityName_default = Ho Chi MinhorganizationName = Organization Name (eg, company)organizationName_default = cs laocai vncommonName = Common Name (e.g. server FQDN or YOUR name)commonName_default = cs.laocai.vnemailAddress = Email AddressemailAddress_default = support@learning.edu.vn[ x509_ext ]subjectKeyIdentifier = hashauthorityKeyIdentifier = keyid,issuerbasicConstraints = CA:FALSEkeyUsage = digitalSignature, keyEnciphermentsubjectAltName = @alternate_namesnsComment = "OpenSSL Generated Certificate"[ req_ext ]subjectKeyIdentifier = hashbasicConstraints = CA:FALSEkeyUsage = digitalSignature, keyEnciphermentsubjectAltName = @alternate_namesnsComment = "OpenSSL Generated Certificate"[ alternate_names ]DNS.1 = cs.laocai.vn
+ Tệp make-cert.bat không phải thay đổi gì@echo offset /p domain="Enter Domain: "set OPENSSL_CONF=../conf/openssl.cnfif not exist .\%domain% mkdir .\%domain%..inopenssl req -config cert.conf -new -sha256 -newkey rsa:2048 -nodes -keyout %domain%server.key -x509 -days 365 -out %domain%server.crtecho.echo -----echo The certificate was provided.echo.pause
Nhấp đúp chuột vào make-cert.bat và nhập tên miền, trong trường hợp này cs.laocai.vn 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<!DOCTYPE html><html> <head> <meta charset="utf8"> <title>cs.laocai.vn</title> </head> <body> <p>Hướng dẫn cấu hình SSL trên localhost cho XAMPP</p> </body></html>
Tệp .htaccessRewriteEngine onRewriteCond %{HTTPS} offRewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]
Mở notepad với quyền administrator.## cs.laocai.vn <VirtualHost *:80> DocumentRoot "C:/xampp/htdocs/cs.laocai.vn" ServerName cs.laocai.vn ServerAlias *.cs.laocai.vn </VirtualHost> <VirtualHost *:443> DocumentRoot "C:/xampp/htdocs/cs.laocai.vn" ServerName cs.laocai.vn ServerAlias *.cs.laocai.vn SSLEngine on SSLCertificateFile "crt/cs.laocai.vn/server.crt" SSLCertificateKeyFile "crt/cs.laocai.vn/server.key" </VirtualHost>
Tác giả: Vàng Văn Quyn
Nguồn tin: wiki.ngoisaoso.vn
Những tin mới hơn
1. Thu thập và Sử dụng Dữ liệu Người dùngỨng dụng của chúng tôi yêu cầu người dùng đăng nhập bằng tài khoản Google của họ để sử dụng các dịch vụ như Google Drive và Google Sheets. Khi người dùng đăng nhập, chúng tôi chỉ thu thập các quyền truy cập cần thiết như quyền truy cập vào các tệp Drive và...
- Click vào nút hiển thị ngày trong tuần hoặc tháng âm lịch để xem chi tiết
- Màu đỏ: Ngày tốt
- Xanh lá: Đầu tháng âm lịch
- Màu vàng: Ngày hiện tại