Skip to content

Instantly share code, notes, and snippets.

View Eng-Fouad's full-sized avatar

Fouad Almalki Eng-Fouad

View GitHub Profile
@Eng-Fouad
Eng-Fouad / steps.md
Last active June 15, 2018 22:05
Hosting Websphere Liberty behind a proxy server (apache) under a subdomain

/opt/wlp/usr/servers/defaultServer/server.xml:

...

<keyStore id="defaultKeyStore"
       type="JKS" password="{xor}Lz4sLB80OiZmZmY=" 
       pollingRate="5s" 
       updateTrigger="polled" />

...

@Eng-Fouad
Eng-Fouad / steps.md
Last active August 25, 2017 12:58
Importing Let's Encrypt SSL certificates into Websphere Liberty server
  1. After creating the server (i.e. /opt/wlp/bin/server create), create the security directory:
cd /opt/wlp/usr/servers/defaultServer/
mkdir resources
mkdir resources/security
  1. Export your certificates into pkcs12 keystore (replace fouad.io with appropriate parameter):
sudo openssl pkcs12 -export -out key.p12 -in /etc/letsencrypt/live/fouad.io/fullchain.pem -name default -inkey /etc/letsencrypt/live/fouad.io/privkey.pem -password pass:123456
@Eng-Fouad
Eng-Fouad / ssl-certs.md
Last active June 23, 2024 05:50
Generate self-signed PKCS#12 SSL certificate and export its keys using Java keytool and openssl.

Steps to generate self-signed PKCS#12 SSL certificate and export its keys:

1- Create PKCS#12 keystore (.p12 or .pfx file)

keytool -genkeypair -keystore myKeystore.p12 -storetype PKCS12 -storepass MY_PASSWORD -alias KEYSTORE_ENTRY -keyalg RSA -keysize 2048 -validity 99999 -dname "CN=My SSL Certificate, OU=My Team, O=My Company, L=My City, ST=My State, C=SA" -ext san=dns:mydomain.com,dns:localhost,ip:127.0.0.1
  • myKeystore.p12 = keystore filename. It can with .pfx extension as well.
  • MY_PASSWORD = password used for the keystore and the private key as well.
  • CN = commonName, it will be shown as certiciate name in certificates list.
  • OU = organizationUnit, department name for example.
@Eng-Fouad
Eng-Fouad / website.css
Created May 16, 2017 18:25
GitBook RTL Theme
@import url(//fonts.googleapis.com/earlyaccess/notonaskharabic.css);
@import url(//fonts.googleapis.com/earlyaccess/notokufiarabic.css);
body, html {
overflow-x: hidden;
font-family: "Noto Naskh Arabic", "Helvetica Neue", Helvetica, Arial, sans-serif;
direction: rtl;
}
.book.font-family-0 {