about summary refs log tree commit diff stats
path: root/linux/scripts/setup-nginx.sh
diff options
context:
space:
mode:
authorbuilder <builder@host>2021-02-26 00:18:20 +0000
committerbuilder <builder@host>2021-02-26 00:18:20 +0000
commit2a862d9141a84b612ec2dd109a7f74a2b10ffb91 (patch)
tree037170f7158639bb6d43ac7ebc656df8e6dcc2bc /linux/scripts/setup-nginx.sh
parent88ad431d4bef94a816b4a1031fb5a62d4bd8a0d7 (diff)
downloaddoc-2a862d9141a84b612ec2dd109a7f74a2b10ffb91.tar.gz
tools scripts moved to linux
Diffstat (limited to 'linux/scripts/setup-nginx.sh')
-rw-r--r--linux/scripts/setup-nginx.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/linux/scripts/setup-nginx.sh b/linux/scripts/setup-nginx.sh
new file mode 100644
index 0000000..11065d2
--- /dev/null
+++ b/linux/scripts/setup-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 www: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
+