Skip to content

Commit 8cb05b3

Browse files
committed
In beforeInstall.sh, modified the nginx.conf file to output the ip and specify the gzip_types.
1 parent 1d5d135 commit 8cb05b3

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

scripts/beforeInstall.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,12 @@ apt-get install nginx -y
7272
echo "Adding Nginx www-data user to tomcat group"
7373
usermod -a -G tomcat www-data
7474

75+
echo "Adding ip to nginx.conf"
76+
sed 's/http {/http {\n add_header ip $server_addr;/' -i /etc/nginx/nginx.conf
77+
78+
echo "Adding gzip_types to nginx.conf"
79+
sed 's/gzip on;/gzip on;\n gzip_types text\/plain text\/xml image\/gif image\/jpeg image\/png image\/svg+xml application\/json application\/javascript application\/x-javascript text\/javascript text\/css;/' -i /etc/nginx/nginx.conf
80+
7581
echo "Copying WISE Nginx config file to Nginx sites-enabled folder"
7682
rm -f /etc/nginx/sites-enabled/*
7783
cp $BUILD_FILES/$env/wise.conf /etc/nginx/sites-enabled/wise.conf

0 commit comments

Comments
 (0)