Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions OracleLinuxDevelopers/oraclelinux10/httpd/2.4/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

set -eu pipefail

SERVER_CERT="$CERTIFICATE_DIR/fullchain.pem"
SERVER_KEY="$KEY_DIR/privkey.pem"

if [ ! -f "$SERVER_KEY" ]; then
echo "Generating certificate private key for SSL support" 1>&2
openssl genpkey -algorithm RSA -out "$SERVER_KEY" 1>&2
fi

if [ ! -f "$SERVER_CERT" ]; then
echo "Generating self-signed certificate for SSL support" 1>&2
openssl req -x509 -new -nodes -key "$SERVER_KEY" -sha256 -days 3650 -out "$SERVER_CERT" -subj "/C=US/ST=California/L=San Francisco/O=Test Company/CN=localhost" 1>&2
fi

httpd -DFOREGROUND