From c35ec3e3aafc3763a83299908f65fe2ae40f2379 Mon Sep 17 00:00:00 2001 From: Graham Land Date: Tue, 25 Sep 2018 23:42:04 +0100 Subject: [PATCH] updated --- Vagrantfile | 1 - conf/wpc-fe.conf | 8 ++++++++ scripts/install_webserver.sh | 4 +++- 3 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 conf/wpc-fe.conf diff --git a/Vagrantfile b/Vagrantfile index a6c6af2..a19e1a4 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -62,7 +62,6 @@ Vagrant.configure("2") do |config| web01.vm.hostname = ENV['NGINX_NAME'] web01.vm.network "private_network", ip: ENV['NGINX_IP'] web01.vm.network "forwarded_port", guest: ENV['NGINX_GUEST_PORT'], host: ENV['NGINX_HOST_PORT'] - web01.vm.provision "file", source: "webclient/wpc-fe/", destination: "/tmp/wpc-fe" web01.vm.provision :shell, path: "scripts/install_webserver.sh" end diff --git a/conf/wpc-fe.conf b/conf/wpc-fe.conf new file mode 100644 index 0000000..e7a68f4 --- /dev/null +++ b/conf/wpc-fe.conf @@ -0,0 +1,8 @@ +server { + listen 9091 default_server; + + location / { + root /var/www/wpc-fe; + index index.html index.htm; + } +} \ No newline at end of file diff --git a/scripts/install_webserver.sh b/scripts/install_webserver.sh index e6bea08..519c8e8 100755 --- a/scripts/install_webserver.sh +++ b/scripts/install_webserver.sh @@ -67,7 +67,9 @@ EOF echo 'Register nginx service with Consul Service Discovery Complete' } -sudo mv /tmp/wpc-fe /var/www/ +sudo mv /usr/local/bootstrap/webclient/wpc-fe /var/www/wpc-fe +sudo cp /usr/local/bootstrap/conf/wpc-fe.conf /etc/nginx/conf.d/wpc-fe.conf + # remove nginx default website [ -f /etc/nginx/sites-enabled/default ] && sudo rm -f /etc/nginx/sites-enabled/default