Skip to content
Robert Goldmann edited this page Jun 4, 2019 · 7 revisions

HTTPS

Step 1: Get a certificate

You can use official or self-signed certificates.
For example, a self-signed certificate can be obtained with this command:
openssl req -x509 -newkey rsa:4096 -keyout privkey.pem -out fullchain.pem -days 365

Step 2: Create a PKCS12 file containing full chain and private key

openssl pkcs12 -export -in fullchain.pem -inkey privkey.pem -out pkcs.p12 -name NAME

That's all for BudgetMaster stand-alone.


BudgetMaster with Tomcat

Step 3: Create a keystore containing the private and public key

keytool -importkeystore -destkeystore keystore.jks -srckeystore pkcs.p12 -srcstoretype PKCS12 -alias NAME

Step 4: Configure Tomcat

Open conf/server.xml inside your Tomcat directory and activate the HTTPS connector.

<Connector port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol"
           maxThreads="150" SSLEnabled="true" scheme="https" secure="true"
           clientAuth="false" sslProtocol="TLS"
           keyAlias="ALIAS" keystoreFile="/srv/jakarta/.keystore"
           keystorePass="PW from step 1" />

Note: You have to adjust keyAlias, keystoreFile and keystorePass accordingly.

Step 5: Restart Tomcat