
ไปที่ https://geekflare.com/apache-setup-ssl-certificate/
เพื่อโหลด file แล้วเอามาลงในเครื่อง
แก้ไข httpd.conf
- เปิด LoadModule socache_shmcb_module libexec/apache24/mod_socache_shmcb.so
- เปิด LoadModule ssl_module libexec/apache24/mod_ssl.so
- เปิด Include etc/apache24/extra/httpd-ssl.conf
แก้ไข file etc/apache24/extra/httpd-ssl.conf ให้ถูกต้อง
ทำ Redirect http->https
- สร้าง file .htaccess ที่ root Document มี 3 บันทัดนี้
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L] - ปรับ httpd.conf ดังนี้<Directory />
AllowOverride none
require all denied
</Directory>DocumentRoot “/home/adminbuncha”
<Directory “/home/adminbuncha”>
Options -Indexes
AllowOverride All
Require all granted
</Directory>