4 changed files with 77 additions and 1 deletions
@ -0,0 +1,15 @@ |
|||||
|
#!/bin/sh |
||||
|
|
||||
|
if [ $# -ne 1 ]; then |
||||
|
echo "Usage: $0 user@target.hostname" |
||||
|
exit 1 |
||||
|
fi |
||||
|
|
||||
|
set -xe |
||||
|
|
||||
|
ssh $1 mkdir -p /srv/nginx/default/ |
||||
|
echo "Hello, World!" | ssh $1 tee /srv/nginx/default/index.html |
||||
|
scp nginx.conf $1:/etc/nginx/nginx.conf |
||||
|
ssh $1 /etc/init.d/nginx restart || true |
||||
|
ssh $1 pgrep nginx |
||||
|
curl http://$1/ |
||||
@ -0,0 +1,34 @@ |
|||||
|
user nobody nogroup; |
||||
|
|
||||
|
worker_processes auto; |
||||
|
worker_cpu_affinity auto; |
||||
|
|
||||
|
error_log syslog:server=unix:/dev/log,nohostname crit; |
||||
|
|
||||
|
events { |
||||
|
worker_connections 1024; |
||||
|
multi_accept on; |
||||
|
} |
||||
|
|
||||
|
http { |
||||
|
# don't leak nginx version number in the "Server" HTTP Header |
||||
|
server_tokens off; |
||||
|
|
||||
|
server_names_hash_bucket_size 64; |
||||
|
include mime.types; |
||||
|
|
||||
|
access_log off; |
||||
|
|
||||
|
sendfile on; |
||||
|
keepalive_timeout 65; |
||||
|
gzip off; |
||||
|
|
||||
|
server { |
||||
|
listen 0.0.0.0:80 deferred; |
||||
|
|
||||
|
# Main content |
||||
|
root /srv/nginx/default; |
||||
|
index index.html index.htm; |
||||
|
} |
||||
|
} |
||||
|
|
||||
Loading…
Reference in new issue