Support us by joining this link

04 October 2017

MEMBUAT SERVER SECURE WEB (HTTPS) di LINUX DEBIAN

MEMBUAT SERVER SECURE WEB (HTTPS) di LINUX DEBIAN
1. Pastikan DNS dan Web server sudah aktif
2. apt-get install openssl ssl-cert
3. mkdir /etc/apache2/ssl
4. make-ssl-cert   /usr/share/ssl-cert/ssleay.cnf   /etc/apache2/ssl/apache.pem
5. a2ensite ssl
6. a2enmod ssl
7. /etc/init.d/apache2 force-reload
8. cp /etc/apache2/sites-available/default-ssl.conf  /etc/apache2/sites-available/ssl.conf
9. nano /etc/apache2/sites-available/ssl.conf
<IfModule mod_ssl.c>
      <VirtualHost _default_:443>
            ServerName www.smkdt.com
            DocumentRoot /var/www/html

            SSLEngine on

            SSLCertificateFile      /etc/ssl/certs/ssl-cert-snakeoil.pem
            SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key

      </VirtualHost>
</IfModule>
 
10. nano /etc/apache2/sites-available/web.conf
<VirtualHost *:80>
      ServerName www.smkdt.com
      ServerAlias smkdt.com

      ServerAdmin webmaster@smkdt.com
      DocumentRoot /var/www/html

</VirtualHost>
SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
 
11. nano /etc/rc.local
      iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
      iptables -A INPUT -p tcp -m tcp --dport 443 -j ACCEPT
12. a2ensite ssl.conf
13. /etc/init.d/apache2 restart
14. /etc/init.d/rc.local restart
15. w3m  http://www.smkdt.com
16. w3m  https://www.smkdt.com


tkj.smk-daruttaqwa.sch.id

No comments:

Post a Comment