study / okdevtv star
허광남 허광남 2021-09-14
elk nginx
@10dee6434aa8fecd38dd66a2b2c52e8a946a1a67
public/md/elk/elastic-setup.sh
--- public/md/elk/elastic-setup.sh
+++ public/md/elk/elastic-setup.sh
@@ -7,7 +7,6 @@
 sudo chown -R ec2-user:ec2-user /usr/share/nginx/html
 echo "<h1>Hello World</h1>" > /usr/share/nginx/html/hello.html
 
-sudo yum remove java-1.7.0-openjdk.x86_64 -y
 sudo yum install java-1.8.0-openjdk-devel.x86_64 -y
 
 mkdir ~/local
@@ -37,3 +36,13 @@
 cd -
 nohup bin/logstash -f logconf/okdevtv.conf &
 
+sudo amazon-linux-extras install -y nginx1.12
+sudo systemctl enable nginx
+
+sudo mv /etc/nginx/nginx.conf /etc/nginx/nginx.conf.orig
+sudo sh -c "sed '38,87d' /etc/nginx/nginx.conf.orig > /etc/nginx/nginx.conf"
+cd /etc/nginx/conf.d
+sudo curl -O https://raw.githubusercontent.com/kenu/okdevtv/main/sh/elk.conf
+sleep 2
+sudo systemctl start nginx
+
sh/elk.conf
--- sh/elk.conf
+++ sh/elk.conf
@@ -9,7 +9,7 @@
 
     location / {
         sendfile off;
-        proxy_pass         http://127.0.0.1:3010;
+        proxy_pass         http://127.0.0.1:5601;
         proxy_redirect     default;
         proxy_http_version 1.1;
         proxy_set_header   Host              $host;
Add a comment
List