• Membuat Url Https di Server Sendiri – Linux

    Ane nerapin konfig ini di ubuntu server 14 gan .. ini step by step nya ..

    1. install dlu apache2 nya :

    • sudo apt-get install apache2

    2. aktifin service ssl

    • sudo a2enmod ssl

    3. Restart apache2

    • sudo service apache2 restart

    4. Buat folder ssl utk sertifikat ssl agan

    • sudo mkdir /etc/apache2/ssl

    5. Bikin sertifikat ny, pake script ini :

    openssl req -x509 -nodes -days 730 -newkey rsa:2048 -keyout /etc/apache2/ssl/apache.key -out /etc/apache2/ssl/apache.crt
    Country Name (2 letter code) [AU]:ID
    State or Province Name (full name) [Some-State]:Jawa Barat
    Locality Name (eg, city) []:DKI
    Organization Name (eg, company) [Internet Widgits Pty Ltd]:it-solutions.ink
    Organizational Unit Name (eg, section) []:Dept IT
    Common Name (e.g. server FQDN or YOUR name) []:it-solutions.zz.mu
    Email Address []:admin@it-solutions.zz.mu

    6. Klw udah beres, edit file ssl nya

    sudo nano /etc/apache2/sites-available/default-ssl

    ServerAdmin admin@it-solutions.zz.mu
    ServerName www.it-solutions.zz.mu
    DocumentRoot /var/www/public_html

    # Tambahkan baris ini di file default-ssl anda

    SSLEngine On
    SSLCertificateFile /etc/apache2/ssl/apache.crt
    SSLCertificateKeyFile /etc/apache2/ssl/apache.key

    Selanjutnya cari baris ini dan berikan tanda comment (#):
    # SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
    # SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key

    7. Aktifkan website default-ssl

    • sudo a2ensite default-ssl

    8. Baiklah semuanya telah selesai, sekarang restart apache kita.

    • sudo service apache2 restart

    9. Beres dah, sekarang coba akses url https nya

    • https://namaweb.com

    10. Ini utk disable url https gan

    • sudo a2dismod ssl
    • sudo a2dissite default-ssl
    • sudo service apache2 restart