diff --git a/scripts/remote-install.sh b/scripts/remote-install.sh
index 8bc6b70e..b1a9c7cb 100644
--- a/scripts/remote-install.sh
+++ b/scripts/remote-install.sh
@@ -289,9 +289,9 @@ dev tun
remote $MY_IP_ADDR 1194 udp
-EOF
+EOFCLIENT
-cat < /etc/openvpn/udp1194.conf
+cat < /etc/openvpn/udp1194.conf
server 172.16.253.0 255.255.255.0
verb 3
duplicate-cn
@@ -308,7 +308,7 @@ port 1194
dev tun1194
status openvpn-status-1194.log
log-append /var/log/openvpn-udp1194.log
-EOF
+EOFUDP
echo "Setup HTTP server for serving client certificate"
mkdir -p /usr/share/nginx/openvpn/$UUID
@@ -316,12 +316,13 @@ cp /root/client.ovpn /usr/share/nginx/openvpn/$UUID/$HOSTNAME.ovpn
touch /usr/share/nginx/openvpn/$UUID/index.html
touch /usr/share/nginx/openvpn/index.html
-cat < /etc/nginx/sites-available/openvpn
+cat < /etc/nginx/sites-available/openvpn
server {
listen 8003;
root /usr/share/nginx/openvpn;
}
-EOFCLIENT
+EOFNGINX
+
[ -f /etc/nginx/sites-enabled/openvpn ] || ln -s /etc/nginx/sites-available/openvpn /etc/nginx/sites-enabled/
service nginx stop
service nginx start