Skip to content

Instantly share code, notes, and snippets.

@ep4sh
Last active May 11, 2019 16:37
Show Gist options
  • Save ep4sh/9437b97a86893985cb8c0d2beabc26f2 to your computer and use it in GitHub Desktop.
Save ep4sh/9437b97a86893985cb8c0d2beabc26f2 to your computer and use it in GitHub Desktop.
nginx sed
sudo yum install epel-release -y && sudo yum install nginx -y && \
sudo sed -i 's/listen .* 80 .*/listen 8080 default_server;/' /etc/nginx/nginx.conf && \
sudo sh -c "echo `curl -s http://169.254.169.254/latest/meta-data/public-ipv4` > /usr/share/nginx/html/index.html" && \
sudo systemctl restart nginx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment