mirror of
https://github.com/hoellen/dockerfiles.git
synced 2025-04-20 04:19:18 +00:00
update ngxproxy
This commit is contained in:
parent
8781136d93
commit
7c991ab8e1
@ -34,6 +34,12 @@ read -p "Port (default is 80): " PORT
|
|||||||
|
|
||||||
if [ "$PORT" == "" ]; then
|
if [ "$PORT" == "" ]; then
|
||||||
PORT="80"
|
PORT="80"
|
||||||
|
elif ! [ "$PORT" -eq "$PORT" ] 2>/dev/null; then
|
||||||
|
echo "ERROR: an integer value was expected."
|
||||||
|
exit 1
|
||||||
|
elif [ "$PORT" -gt "65535" ]; then
|
||||||
|
echo "ERROR: $PORT exceeds the maximum TCP port which is 65535"
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
while [[ "$HTTPS" != "y" && "$HTTPS" != "n" ]]; do
|
while [[ "$HTTPS" != "y" && "$HTTPS" != "n" ]]; do
|
||||||
@ -60,9 +66,8 @@ if [ "$HTTPS" == "y" ]; then
|
|||||||
read -p "Secure headers [y/n]: " HEADERS
|
read -p "Secure headers [y/n]: " HEADERS
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ "$HEADERS" == "y" ]; then
|
if [ "$HEADERS" == "n" ]; then
|
||||||
sed -i 's|#include /etc/nginx/conf/headers_params|include /etc/nginx/conf/headers_params|g' \
|
sed -i '|include /etc/nginx/conf/headers_params|d' /sites-enabled/$NAME.conf
|
||||||
/sites-enabled/$NAME.conf
|
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
cp /etc/nginx/conf/vhost_http.conf /sites-enabled/${NAME}.conf
|
cp /etc/nginx/conf/vhost_http.conf /sites-enabled/${NAME}.conf
|
||||||
|
@ -2,7 +2,7 @@ server {
|
|||||||
listen 8000;
|
listen 8000;
|
||||||
server_name <DOMAIN>;
|
server_name <DOMAIN>;
|
||||||
|
|
||||||
#client_max_body_size <MAX_BODY_SIZE>M;
|
client_max_body_size <MAX_BODY_SIZE>M;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
proxy_pass http://<CONTAINER>:<PORT>;
|
proxy_pass http://<CONTAINER>:<PORT>;
|
||||||
|
@ -12,9 +12,9 @@ server {
|
|||||||
ssl_certificate_key <KEY_PATH>;
|
ssl_certificate_key <KEY_PATH>;
|
||||||
|
|
||||||
include /conf.d/ssl_params.conf;
|
include /conf.d/ssl_params.conf;
|
||||||
#include /etc/nginx/conf/headers_params;
|
include /etc/nginx/conf/headers_params;
|
||||||
|
|
||||||
#client_max_body_size <MAX_BODY_SIZE>M;
|
client_max_body_size <MAX_BODY_SIZE>M;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
proxy_pass http://<CONTAINER>:<PORT>;
|
proxy_pass http://<CONTAINER>:<PORT>;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user