Skip to content
Snippets Groups Projects
Commit df049ca4 authored by Nikos Kasioumis's avatar Nikos Kasioumis
Browse files

Take the Nginx configuration files into account

* Look for and move Nginx configuration files back into the standard
  directory such that the original assemble script will take them into
  account.
parent c59bb6a2
Branches
No related tags found
No related merge requests found
...@@ -18,11 +18,31 @@ mv /tmp/src /tmp/src-original ...@@ -18,11 +18,31 @@ mv /tmp/src /tmp/src-original
cd /tmp/src-original/ cd /tmp/src-original/
/opt/rh/rh-python36/root/usr/bin/mkdocs build --clean --site-dir /tmp/src/ /opt/rh/rh-python36/root/usr/bin/mkdocs build --clean --site-dir /tmp/src/
# Move the Nginx-related files back to the standard directory.
if [ -f ./nginx.conf ]; then
echo "---> Moving nginx.conf configuration file..."
mv ./nginx.conf /tmp/src/nginx.conf
fi
if [ -d ./nginx-cfg ]; then
echo "---> Moving nginx configuration files..."
mv ./nginx-cfg /tmp/src/nginx-cfg
fi
if [ -d ./nginx-default-cfg ]; then
echo "---> Moving nginx default server configuration files..."
mv ./nginx-default-cfg /tmp/src/nginx-default-cfg
fi
if [ -d ./nginx-start ]; then
echo "---> Moving nginx start-hook scripts..."
mv ./nginx-start /tmp/src/nginx-start
fi
# Configure nginx to not specify the port in absolute redirects. # Configure nginx to not specify the port in absolute redirects.
mkdir /tmp/src/nginx-default-cfg/ if [ ! -f /tmp/src/nginx-default-cfg/redirect.conf ]; then
mkdir --parents /tmp/src/nginx-default-cfg/
cat <<EOF> /tmp/src/nginx-default-cfg/redirect.conf cat <<EOF> /tmp/src/nginx-default-cfg/redirect.conf
port_in_redirect off; port_in_redirect off;
EOF EOF
fi
# Go back to the current directory. # Go back to the current directory.
cd $cwd cd $cwd
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment