Created
February 9, 2017 07:00
-
-
Save orleika/cb2b520f317f93d7ad5752d9ee86d357 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo sh -c 'echo "127.0.0.1 localhost test" >> /etc/hosts' && sudo sh -c 'echo "127.0.0.1 localhost test" >> /etc/hosts' && sudo apt-get update && sudo apt-get install nginx -y && sudo sh -c 'echo {\"status\": \"OK\"} > /var/www/html/check.json' && sudo sh -c 'cat << EOS > /etc/nginx/sites-available/default | |
server { | |
listen 80 default_server; | |
listen [::]:80 default_server; | |
root /var/www/html; | |
index index.html index.htm index.nginx-debian.html; | |
location / { | |
try_files \$uri \$uri.json \$uri/ =404; | |
} | |
} | |
EOS | |
' && sudo service nginx start && sudo service nginx restart && curl -LI 127.0.0.1:80/ -o /dev/null -w '%{http_code}\n' -s && curl -i 127.0.0.1:80/check |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment