diff --git a/README.md b/README.md index a9666cb..c4ca52a 100644 --- a/README.md +++ b/README.md @@ -796,6 +796,33 @@ Selamat SSL sudah aktif #### Step 3: Prestashop +Untuk prestashop kita akan mengaktifkan ssl pada apache juga, karena jika tidak maka akan terjadi mixed blocking + +Pertama install module ssl untuk apache +``` +# yum -y install mod_ssl +``` +Kemudian buka virtualhost ssl.conf + +dan ubah listen port 443 menjadi 8090, karena port 443 sudah dipakai oleh nginx + +kemudian tambahkan headler php seperti yang sudah di buat pada serverblock sebelumnya, juga tambahkan path ssl dan ubah root dir nya + + + +cek apakah ada yang error + +``` +# httpd -t +``` + +restart apache +``` +# systemctl restart httpd +``` + +Selanjut nya konfigurasi server block nginx, + Buka dan ubah server block prestashop, dan aktifkan ssl ``` # vim /etc/nginx/conf.d/prestashop.conf @@ -823,7 +850,7 @@ location / { proxy_set_header Host $host; proxy_set_header Accept-Encoding ""; - proxy_pass http://prestashop.task.my.id:8080; + proxy_pass https://prestashop.task.my.id:8090; } } ``` @@ -839,3 +866,119 @@ ``` # systemctl restart nginx ``` + +Selanjutnya akses prestashop sebagai admin dan masuk pada tab, Shop Paramater > General + + + + +Kemudian cek ssl "Please click here to check if your shop supports HTTPS." + +Selanjutnya enable ssl dan save + + + + +#### Step 4: Wordpress +Sama seperti prestashop, kita harus mengaktifkan ssl pada apache untuk menghindari mixed blocking + +Kemudian buka virtualhost ssl.conf + +Lalu tambahkan virtualhost baru untuk wordpress pada baris palung bawah + +``` + +DocumentRoot "/home/wordpress" +ServerName wordpress.task.my.id:8090 + + + SetHandler "proxy:fcgi://127.0.0.1:9072" + + + + DirectoryIndex index.php index.html index.htm + +AllowOverride all +Order allow,deny +Allow from all + + +ErrorLog logs/ssl_error_log +TransferLog logs/ssl_access_log +LogLevel warn +SSLEngine on +SSLProtocol all -SSLv2 -SSLv3 +SSLCipherSuite HIGH:3DES:!aNULL:!MD5:!SEED:!IDEA + +SSLCertificateFile /etc/nginx/ssl/wordpress/certificate.crt +SSLCertificateKeyFile /etc/nginx/ssl/wordpress/private.key + + + SSLOptions +StdEnvVars + + + SSLOptions +StdEnvVars + + +BrowserMatch "MSIE [2-5]" \ + nokeepalive ssl-unclean-shutdown \ + downgrade-1.0 force-response-1.0 + +CustomLog logs/ssl_request_log \ + "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b" + + +``` + +cek apakah ada yang error + +``` +# httpd -t +``` + +restart apache +``` +# systemctl restart httpd +``` + +Selanjut nya konfigurasi server block nginx, + +Buka dan ubah server block prestashop, dan aktifkan ssl +``` +# vim /etc/nginx/conf.d/prestashop.conf +``` +Lalu ubah seperti di bawah ini +``` +server{ + listen 80; + server_name wordpress.task.my.id; + return 301 https://$server_name$request_uri; +} + +server { + listen 443 ssl; + server_name wordpress.task.my.id; + + ssl_certificate /etc/nginx/ssl/wordpress/certificate.crt; + ssl_certificate_key /etc/nginx/ssl/wordpress/private.key; + + location / { + proxy_set_header Host $host; + proxy_set_header Accept-Encoding ""; + proxy_pass https://wordpress.task.my.id:8090; + } +} +``` + +Cek apakah ada yang error pada konfigurasi +``` +# nginx -t +``` +Restart nginx +``` +# systemctl restart nginx +``` + +Selanjutnya akseswordpress kembali dan pastikan sudah aktif ssl nya + +