Install ssl server development (jetty)

Untuk server development, disini kita pakai jetty, biasanya masih self signed. Nanti kalau udah di production baru pake nginx / apache.

Untuk bikin SSL self signed di jetty bisa mengikuti langkah2 di URL berikut:
https://wiki.eclipse.org/Jetty/Howto/Configure_SSL

Intinya kurang lebih seperti ini :

  1. ketik ini di computer yang ada java jdk nya:
    keytool -keystore keystore -alias jetty -genkey -keyalg RSA -sigalg SHA256withRSA
  2. Enter keystore password:  –> isi pake password
    What is your first and last name?
    [Unknown]:  –> isi pakai ip server
    What is the name of your organizational unit?
    [Unknown]:  –> isi bebas, misalnya “Divisi IT”
    What is the name of your organization?
    [Unknown]:  –> isi bebas, misalnya: “CTBC”
    What is the name of your City or Locality?
    [Unknown]: –> misalnya: “Jakarta”
    What is the name of your State or Province?
    [Unknown]: –> misalnya: “DKI Jakarta”
    What is the two-letter country code for this unit?
    [Unknown]: ID
    Is blablabla correct?
    [no]:  yes
  3. nanti akan terbentuk file yg namanya keystore
    nah file “keystore” ini silakan dicopy ke server di folder /opt/jettyblablabla/etc/

 

keytool itu biasanya di folder jdk\bin, misalnya:
C:\Program Files\Java\jdk1.7.0_79\bin

btw, defaultnya validnya ssl self signed keytool itu kalo ga salah cuma 90 hari.. kalo mau panjang (mis: 365 hari), command keytool nya ditambahin jadi:
keytool -keystore keystore -alias jetty -genkey -keyalg RSA -sigalg SHA256withRSA -validity 365

 

sumber : di sadap dari chatting pak Yohan (senior dev)

 

About rile

lazy cat

Posted on October 12, 2015, in Catatan Developer. Bookmark the permalink. Leave a comment.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: