|
| 1 | + |
| 2 | +#user http; |
| 3 | +worker_processes 1; |
| 4 | + |
| 5 | +#error_log logs/error.log; |
| 6 | +#error_log logs/error.log notice; |
| 7 | +#error_log logs/error.log info; |
| 8 | + |
| 9 | +#pid logs/nginx.pid; |
| 10 | + |
| 11 | + |
| 12 | +events { |
| 13 | + worker_connections 1024; |
| 14 | +} |
| 15 | + |
| 16 | + |
| 17 | +http { |
| 18 | + include mime.types; |
| 19 | + default_type application/octet-stream; |
| 20 | + |
| 21 | + #log_format main '$remote_addr - $remote_user [$time_local] "$request" ' |
| 22 | + # '$status $body_bytes_sent "$http_referer" ' |
| 23 | + # '"$http_user_agent" "$http_x_forwarded_for"'; |
| 24 | + |
| 25 | + #access_log logs/access.log main; |
| 26 | + |
| 27 | + sendfile on; |
| 28 | + #tcp_nopush on; |
| 29 | + |
| 30 | + #keepalive_timeout 0; |
| 31 | + keepalive_timeout 65; |
| 32 | + |
| 33 | + #gzip on; |
| 34 | + |
| 35 | + resolver 127.0.0.11 valid=30s; # Docker's DNS server |
| 36 | + |
| 37 | + server { |
| 38 | + listen 80; |
| 39 | + server_name localhost; |
| 40 | + #charset koi8-r; |
| 41 | + |
| 42 | + #access_log logs/host.access.log main; |
| 43 | + |
| 44 | + location / { |
| 45 | + proxy_http_version 1.1; |
| 46 | + proxy_set_header Upgrade $http_upgrade; |
| 47 | + proxy_set_header Connection "upgrade"; |
| 48 | + proxy_set_header X-Real-IP $remote_addr; |
| 49 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
| 50 | + proxy_set_header Host $http_host; |
| 51 | + proxy_set_header X-NginX-Proxy true; |
| 52 | + |
| 53 | + proxy_pass http://localhost:26657/; |
| 54 | + } |
| 55 | + |
| 56 | + location /healthcheck { |
| 57 | + fastcgi_param SCRIPT_FILENAME /usr/share/nginx/html/healthcheck.sh; |
| 58 | + fastcgi_pass unix:/var/run/fcgiwrap.socket; |
| 59 | + } |
| 60 | + |
| 61 | + #error_page 404 /404.html; |
| 62 | + |
| 63 | + # redirect server error pages to the static page /50x.html |
| 64 | + # |
| 65 | + error_page 500 502 503 504 /50x.html; |
| 66 | + location = /50x.html { |
| 67 | + root /usr/share/nginx/html; |
| 68 | + } |
| 69 | + } |
| 70 | +} |
0 commit comments