Monday, November 11, 2024
Centos SSL

Install SSL di linux centos – apache

Cara nya sebagai berikut :

1. install ssl nya

yum install mod_ssl

2. kemudian buat folder baru

mkdir /etc/httpd/ssl

3. kemudina buat sertifikat ssl nya

openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/httpd/ssl/apache.key -out /etc/httpd/ssl/apache.crt

4. config httpd nya

vi /etc/httpd/conf.d/ssl.conf

yg wajib ada :

ServerName example.com:443
SSLEngine on
SSLCertificateFile /etc/httpd/ssl/apache.crt
SSLCertificateKeyFile /etc/httpd/ssl/apache.key

5. restart apache

/etc/init.d/httpd restart

6. setting http to https (misal hostname nya asteroid.iixmedia.com )

vi /etc/httpd/conf/httpd.conf

tmabahkan baris berikut di akhir script

ServerName www.asteroid.iixmedia.com
#ServerAlias mydomain.co.uk
#ServerAlias www.mydomain.co.uk
Redirect permanent / https://asteroid.iixmedia.com/

DocumentRoot /var/www/html/
ServerName asteroid.iixmedia.com

7. restart apache

/etc/init.d/httpd restart

8. test akses web

http://ipaddr

atau

http://domain.com

(Visited 57 times, 1 visits today)
Baca Juga :  Install Samba on Centos

Similar Posts