Author: markt Date: Tue Aug 13 15:04:07 2024 New Revision: 1919863 URL: http://svn.apache.org/viewvc?rev=1919863&view=rev Log: Migrate AC NA 2018
Added: tomcat/site/trunk/docs/presentations/2018-09-05-acna-Let's Encrypt Apache Tomcat.pdf (with props) tomcat/site/trunk/docs/presentations/2018-09-05-acna-lets-encrypt-renew.sh Modified: tomcat/site/trunk/docs/presentations.html tomcat/site/trunk/xdocs/presentations.xml Modified: tomcat/site/trunk/docs/presentations.html URL: http://svn.apache.org/viewvc/tomcat/site/trunk/docs/presentations.html?rev=1919863&r1=1919862&r2=1919863&view=diff ============================================================================== --- tomcat/site/trunk/docs/presentations.html (original) +++ tomcat/site/trunk/docs/presentations.html Tue Aug 13 15:04:07 2024 @@ -345,7 +345,7 @@ li.targeted { <ul> <li> State of the Cat - Mark Thomas, - <a href="http://people.apache.org/~markt/presentations/2018-09-24-state-of-the-cat.pdf">slides</a>, + <a href="https://apachecon.com/acna18/presentations/2018-09-24-state-of-the-cat.pdf">slides</a>, <a href="https://feathercast.apache.org/2018/09/25/state-of-the-cat-mark-thomas/">audio</a> </li> <li> @@ -355,8 +355,8 @@ li.targeted { </li> <li> Let's Encrypt Apache Tomcat - Christopher Schultz, - <a href="https://people.apache.org/~schultz/ApacheCon%20NA%202018/Let's%20Encrypt%20Apache%20Tomcat.pdf">slides</a>, - <a href="http://people.apache.org/~schultz/ApacheCon%20NA%202018/">sample code</a>, + <a href="presentations/2018-09-05-acna-Let's%20Encrypt%20Apache%20Tomcat.pdf">slides</a>, + <a href="presentations/2018-09-05-acna-lets-encrypt-renew.sh">sample code</a>, <a href="https://feathercast.apache.org/2018/09/25/lets-encrypt-apache-tomcat-christopher-schultz/">audio</a> </li> <li> Added: tomcat/site/trunk/docs/presentations/2018-09-05-acna-Let's Encrypt Apache Tomcat.pdf URL: http://svn.apache.org/viewvc/tomcat/site/trunk/docs/presentations/2018-09-05-acna-Let%27s%20Encrypt%20Apache%20Tomcat.pdf?rev=1919863&view=auto ============================================================================== Binary file - no diff available. Propchange: tomcat/site/trunk/docs/presentations/2018-09-05-acna-Let's Encrypt Apache Tomcat.pdf ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: tomcat/site/trunk/docs/presentations/2018-09-05-acna-lets-encrypt-renew.sh URL: http://svn.apache.org/viewvc/tomcat/site/trunk/docs/presentations/2018-09-05-acna-lets-encrypt-renew.sh?rev=1919863&view=auto ============================================================================== --- tomcat/site/trunk/docs/presentations/2018-09-05-acna-lets-encrypt-renew.sh (added) +++ tomcat/site/trunk/docs/presentations/2018-09-05-acna-lets-encrypt-renew.sh Tue Aug 13 15:04:07 2024 @@ -0,0 +1,41 @@ +#!/bin/sh + +CATALINA_BASE="${CATALINA_BASE:-${HOME}/tomcat}" +HOSTNAME="${1:-${HOSTNAME}}" +CONNECTOR_ADDRESS="${2:-127.0.0.1}" +CONNECTOR_PORT="${3:-8443}" +SERVICE_PORT="${4:-${CONNECTOR_PORT}}" +JMXUSER=jmxproxy +JMXPASSWORD=jmxproxy +CERTBOT_HOME="${CERTBOT_HOME:-$(dirname "${0}")}" + +LE_BASE="/etc/letsencrypt/live/${HOSTNAME}" +JAVA_HOME="${JAVA_HOME:-/usr/local/java-8}" + +# Attempt certificate renewal +"${CERTBOT_HOME}/certbot-auto" renew + +# Check to see if LT certificate is newer than Java keystore +if [ "${LE_BASE}/cert.pem" -nt "${CATALINA_BASE}/${HOSTNAME}.p12" ] ; then + + # Move the old keystore file out of the way; save a backup + mv --backup=numbered "${CATALINA_BASE}/${HOSTNAME}.p12" "${CATALINA_BASE}/${HOSTNAME}.p12" + + echo "Creating keystore ${CATALINA_BASE}/${HOSTNAME}.p12 from files in $LE_BASE" + + # Use PKCS12 keystore format + openssl pkcs12 -export -in "${LE_BASE}/cert.pem" -inkey "${LE_BASE}/privkey.pem" \ + -certfile "${LE_BASE}/fullchain.pem" \ + -out "${CATALINA_BASE}/${HOSTNAME}.p12" -name tomcat \ + -passout "pass:changeit" + + echo "Reconfiguring Tomcat connector on port ${CONNECTOR_PORT}..." + result=$(curl "https://$JMXUSER:$JMXPASSWORD@localhost:${SERVICE_PORT}/manager/jmxproxy?invoke=Catalina%3Atype%3DProtocolHandler%2Cport%3D${CONNECTOR_PORT}%2Caddress%3D%22${CONNECTOR_ADDRESS}%22&op=reloadSslHostConfigs") + + if [ $(expr "$result" : '^OK') -gt 0 ] ; then + echo "ProtocolHandler has reloaded" + else + echo "Error: ProtocolHandler did not reload properly; response=$result" + fi +fi + Modified: tomcat/site/trunk/xdocs/presentations.xml URL: http://svn.apache.org/viewvc/tomcat/site/trunk/xdocs/presentations.xml?rev=1919863&r1=1919862&r2=1919863&view=diff ============================================================================== --- tomcat/site/trunk/xdocs/presentations.xml (original) +++ tomcat/site/trunk/xdocs/presentations.xml Tue Aug 13 15:04:07 2024 @@ -353,7 +353,7 @@ li.targeted { <ul> <li> State of the Cat - Mark Thomas, - <a href="http://people.apache.org/~markt/presentations/2018-09-24-state-of-the-cat.pdf">slides</a>, + <a href="https://apachecon.com/acna18/presentations/2018-09-24-state-of-the-cat.pdf">slides</a>, <a href="https://feathercast.apache.org/2018/09/25/state-of-the-cat-mark-thomas/">audio</a> </li> <li> @@ -363,8 +363,8 @@ li.targeted { </li> <li> Let's Encrypt Apache Tomcat - Christopher Schultz, - <a href="https://people.apache.org/~schultz/ApacheCon%20NA%202018/Let's%20Encrypt%20Apache%20Tomcat.pdf">slides</a>, - <a href="http://people.apache.org/~schultz/ApacheCon%20NA%202018/">sample code</a>, + <a href="presentations/2018-09-05-acna-Let's%20Encrypt%20Apache%20Tomcat.pdf">slides</a>, + <a href="presentations/2018-09-05-acna-lets-encrypt-renew.sh">sample code</a>, <a href="https://feathercast.apache.org/2018/09/25/lets-encrypt-apache-tomcat-christopher-schultz/">audio</a> </li> <li> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org