-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathproxyBootstrap
More file actions
39 lines (35 loc) · 990 Bytes
/
Copy pathproxyBootstrap
File metadata and controls
39 lines (35 loc) · 990 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/bash
#Post provisioning script for Proxy server NGINX
#Author Esteban Arias
# Contact eariasn@us.ibm.com
#Installing Software
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
yum install -y nginx
Declare="$(cat <<-EOF
server {
listen 80;
server_name wordpress.dom.local;
access_log off;
error_log off;
location / {
proxy_pass http://webserver/;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
client_max_body_size 100M;
client_body_buffer_size 1m;
proxy_intercept_errors on;
proxy_buffering on;
proxy_buffer_size 128k;
proxy_buffers 256 16k;
proxy_busy_buffers_size 256k;
proxy_temp_file_write_size 256k;
proxy_max_temp_file_size 0;
proxy_read_timeout 90;
proxy_send_timeout 90;
}
}
EOF
)"
echo "$Declare" >> /etc/nginx/nginx.conf