Skip to content

Commit

Permalink
Fixed the default site for HTTPs.
Browse files Browse the repository at this point in the history
  • Loading branch information
jlesage committed Nov 3, 2018
1 parent 60b7d1b commit 83c9dfc
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ RUN \
curl -# -L ${NGINX_PROXY_MANAGER_URL} | tar xz --strip 1 -C nginx-proxy-manager && \

# Patch.
curl -# -L https://github.com/jlesage/nginx-proxy-manager/commit/0aa1cb0aa.patch | patch -d nginx-proxy-manager -p1 && \
curl -# -L https://github.com/jlesage/nginx-proxy-manager/commit/20fd18565.patch | patch -d nginx-proxy-manager -p1 || true && \

# Build Nginx Proxy Manager.
echo "Building Nginx Proxy Manager..." && \
Expand Down
15 changes: 15 additions & 0 deletions rootfs/etc/cont-init.d/nginx-proxy-manager.sh
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,21 @@ if [ ! -d /config/mysql ]; then
fi
fi

# Generate dummy self-signed certificate.
if [ ! -f /config/nginx/dummycert.pem ] || [ ! -f /config/nginx/dummykey.pem ]
then
env HOME=/tmp openssl req \
-new \
-newkey rsa:2048 \
-days 3650 \
-nodes \
-x509 \
-subj '/O=Nginx Proxy Manager/OU=Dummy Certificate/CN=localhost' \
-keyout /config/nginx/dummykey.pem \
-out /config/nginx/dummycert.pem \
> /dev/null 2>&1
fi

# Take ownership of the config directory content.
find /config -mindepth 1 -exec chown $USER_ID:$GROUP_ID {} \;

Expand Down

0 comments on commit 83c9dfc

Please sign in to comment.