https://
bukan dengan http://
.Oke langsung saja ke instalasinya: 1.Ubah direkotry ke /etc/pki/tls/certs
# cd /etc/pki/tls/cerrts
2.Lalu buat file server.key
# make server.keydan tambahkan password
3.Kemudian tulis RSA key
#openssl rsa -in server.key -out server.key
4.Lalu buat hari kadaluarsa
5.Install ssl key apache
#yum -y install httpd mod_ssl
6.Enable dan start apache
#systemctl start httpd.service
#systemctl enabled httpd.service
7.Lalu konfigurasi /etc/httpd/conf.d/ssl.conf
kemdian tambahkan scrip berikut
LoadModule ssl_module modules/mod_ssl.so
Listen 443
SSLPassPhraseDialog builtin
SSLSessionCache shmcb:/var/cache/mod_ssl/scache(512000)
SSLSessionCacheTimeout 300
SSLRandomSeed startup file:/dev/urandom 256
SSLRandomSeed connect builtin
SSLCryptoDevice builtin
<VirtualHost *:443>
DocumentRoot "/var/www/html"
ServerName 127.0.0.1:443
ErrorLog logs/ssl_error_log
TransferLog logs/ssl_access_log
LogLevel warn
SSLEngine on
SSLProtocol all -SSLv2
SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW
SSLCertificateFile /etc/pki/tls/certs/server.crt
SSLCertificateKeyFile /etc/pki/tls/certs/server.key
<Files ~ "\.(cgi|shtml|phtml|php3?)$">
SSLOptions +StdEnvVars
</Files>
<Directory "/var/www/cgi-bin">
SSLOptions +StdEnvVars
</Directory>
SetEnvIf User-Agent ".*MSIE.*" \
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"
</VirtualHost>
jika sudah save dan exit8.Restart apache
9.Tambahkan firewall
#firewall-cmd --permanent --add-port=80/tcp
#firewall-cmd --permanent --add-port=443/tcp
10.Reload firewall
# firewall-cmd --reload
11.Buka browser dan ketikkan https://ipserver lalu enter jika muncul seperti gambar tandanya berhasil
referensi:https://www.unixmen.com/45407-2/ dan wikipedia.org
0 komentar:
Post a Comment