diff options
Diffstat (limited to 'tools/scripts/install-nginx.sh')
-rw-r--r-- | tools/scripts/install-nginx.sh | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tools/scripts/install-nginx.sh b/tools/scripts/install-nginx.sh new file mode 100644 index 0000000..decacc1 --- /dev/null +++ b/tools/scripts/install-nginx.sh @@ -0,0 +1,24 @@ +#!/bin/sh + +. `dirname $0`/config-install.sh + +prt-get depinst nginx + +cp -R $CONF_DIR/etc/nginx/* /etc/nginx/ + +mkdir /srv/www +chown nginx:www /srv/www + +usermod -a -G www nginx +usermod -m -d /srv/www nginx + +openssl genrsa -des3 -out /etc/ssl/keys/nginx.key 2048 +openssl req -new -key /etc/ssl/keys/nginx.key -out /etc/ssl/certs/nginx.csr +openssl x509 -req -days 365 \ + -in /etc/ssl/certs/nginx.csr \ + -signkey /etc/ssl/keys/nginx.key \ + -out /etc/ssl/certs/nginx.crt + +cp /etc/ssl/keys/nginx.key /etc/ssl/keys/nginx.key.pass +openssl rsa -in /etc/ssl/keys/nginx.key.pass -out /etc/ssl/keys/nginx.key + |