Small Reverse Proxy Enhancements (#8)
* Only load certs for domains which are doing a proxy. 301 redirects do not need certs. * Fix tabs to spaces. * Add slash to match Hyperling.com script. * Fix comment capitalization.
This commit is contained in:
parent
4c24c30526
commit
5d9c5e495d
@ -1,7 +1,7 @@
|
|||||||
# 2022-10-29 Hyperling
|
# 2022-10-29 Hyperling
|
||||||
# Create website in node container and run it.
|
# Create website in node container and run it.
|
||||||
|
|
||||||
# Using Debian testing so that we use PHP >8. otherwise the shebangs from
|
# Using Debian testing so that we use PHP >8. Otherwise the shebangs from
|
||||||
# the include files (#!/usr/bin/php) show up on the website.
|
# the include files (#!/usr/bin/php) show up on the website.
|
||||||
FROM debian:testing
|
FROM debian:testing
|
||||||
|
|
||||||
@ -11,5 +11,5 @@ RUN apt update && apt install -y sudo php-fpm nodejs npm
|
|||||||
# Run Website
|
# Run Website
|
||||||
CMD rm -rfv www && \
|
CMD rm -rfv www && \
|
||||||
git clone https://github.com/Hyperling/www www && \
|
git clone https://github.com/Hyperling/www www && \
|
||||||
cd www && \
|
cd www && \
|
||||||
./run.sh
|
./run.sh
|
||||||
|
@ -48,7 +48,7 @@ fi
|
|||||||
## Main ##
|
## Main ##
|
||||||
|
|
||||||
# Loop over the proxy configuration files and ensure they have certs.
|
# Loop over the proxy configuration files and ensure they have certs.
|
||||||
ls $DIR/config/conf.d/*.* | while read file; do
|
grep -l proxy_pass $DIR/config/conf.d/*.* | while read file; do
|
||||||
filename=`basename $file`
|
filename=`basename $file`
|
||||||
|
|
||||||
if [[ $filename == *"example.com"* ]]; then
|
if [[ $filename == *"example.com"* ]]; then
|
||||||
|
@ -18,7 +18,7 @@ echo "CERT_DIR=$CERT_DIR"
|
|||||||
mkdir -pv $CERT_DIR
|
mkdir -pv $CERT_DIR
|
||||||
|
|
||||||
# Loop over the proxy configuration files and ensure they have certs.
|
# Loop over the proxy configuration files and ensure they have certs.
|
||||||
ls $DIR/config/conf.d/*.* | while read file; do
|
grep -l proxy_pass $DIR/config/conf.d/*.* | while read file; do
|
||||||
filename=`basename $file`
|
filename=`basename $file`
|
||||||
echo "*** Checking $filename ***"
|
echo "*** Checking $filename ***"
|
||||||
if [[ ! -d $CERT_DIR/$filename ]]; then
|
if [[ ! -d $CERT_DIR/$filename ]]; then
|
||||||
|
@ -9,7 +9,7 @@ version: '3'
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
app:
|
app:
|
||||||
build: .
|
build: ./
|
||||||
restart: always
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
- "80:80"
|
- "80:80"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user