mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-09-18 21:50:56 +00:00
Adding imageproxy check using a real image.
This commit is contained in:
parent
e688e3dd5d
commit
28788b43b0
3 changed files with 13 additions and 15 deletions
|
@ -35,20 +35,19 @@ frontend public
|
|||
bind :443 ssl crt newsblur.com.crt ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES128-SHA:AES256-SHA256:AES256-SHA no-sslv3
|
||||
http-response add-header Strict-Transport-Security max-age=0;\ includeSubDomains
|
||||
option http-server-close
|
||||
|
||||
# Redirect all HTTP traffic to HTTPS
|
||||
redirect scheme https code 301 if !{ ssl_fc }
|
||||
|
||||
acl gunicorn_dead nbsrv(gunicorn) lt 1
|
||||
acl nginx_dead nbsrv(nginx) lt 1
|
||||
acl mx_mode nbsrv(maintenance) lt 1
|
||||
acl is_unread_count url_beg /reader/feed_unread_count
|
||||
|
||||
|
||||
monitor-uri /status
|
||||
monitor fail if gunicorn_dead
|
||||
monitor fail if nginx_dead
|
||||
monitor fail if mx_mode
|
||||
|
||||
# Redirect all HTTP traffic to HTTPS
|
||||
redirect scheme https code 301 if !{ ssl_fc }
|
||||
|
||||
use_backend imageproxy if { hdr_end(host) -i imageproxy.newsblur.com }
|
||||
use_backend push if { hdr_end(host) -i push.newsblur.com }
|
||||
|
@ -70,14 +69,14 @@ frontend public
|
|||
use_backend gunicorn unless gunicorn_dead || nginx_dead
|
||||
|
||||
backend imageproxy
|
||||
option httpchk
|
||||
http-check expect rstatus 200|503
|
||||
server imageproxy01 127.0.0.1:81 check inter 2000ms
|
||||
option httpchk HEAD /sc,sN1megONJiGNy-CCvqzVPTv-TWRhgSKhFlf61XAYESl4=/http:/samuelclay.com/static/images/2019%20-%20Cuba.jpg
|
||||
http-check expect rstatus 200|301
|
||||
server imageproxy01 imageproxy:80 check inter 2000ms
|
||||
|
||||
backend push
|
||||
option httpchk
|
||||
option httpchk GET /_haproxychk
|
||||
http-check expect rstatus 200|503
|
||||
server push01 127.0.0.1:8000 check inter 2000ms
|
||||
server push 127.0.0.1:8000 check inter 2000ms
|
||||
|
||||
backend node_socket
|
||||
balance roundrobin
|
||||
|
@ -116,7 +115,7 @@ backend gunicorn_counts
|
|||
server gunicorndebug 127.0.0.1:8000 check inter 600000ms
|
||||
|
||||
backend maintenance
|
||||
option httpchk HEAD /maintenance HTTP/1.1\r\nHost:\ www
|
||||
option httpchk HEAD /maintenance
|
||||
http-check expect status 404
|
||||
http-check send-state
|
||||
server nginxdebug 127.0.0.1:81 check inter 2000ms
|
||||
|
|
|
@ -51,7 +51,6 @@ frontend public
|
|||
monitor fail if mx_mode
|
||||
|
||||
use_backend imageproxy if { hdr_end(host) -i imageproxy.newsblur.com }
|
||||
use_backend imageproxy if { hdr_end(host) -i iproxy.newsblur.com }
|
||||
use_backend push if { hdr_end(host) -i push.newsblur.com }
|
||||
use_backend node_socket if { path_beg /v2/socket.io/ }
|
||||
use_backend node_socket3 if { path_beg /v3/socket.io/ }
|
||||
|
@ -71,8 +70,8 @@ frontend public
|
|||
use_backend gunicorn unless gunicorn_dead || nginx_dead
|
||||
|
||||
backend imageproxy
|
||||
option httpchk
|
||||
http-check expect rstatus 200|503
|
||||
option httpchk HEAD /sc,sN1megONJiGNy-CCvqzVPTv-TWRhgSKhFlf61XAYESl4=/http:/samuelclay.com/static/images/2019%20-%20Cuba.jpg
|
||||
http-check expect rstatus 200|301
|
||||
server imageproxy01 imageproxy:80 check inter 2000ms
|
||||
|
||||
backend node_socket
|
||||
|
|
|
@ -4,8 +4,8 @@ directory=/srv/code/go/bin/
|
|||
user=sclay
|
||||
autostart=true
|
||||
autorestart=true
|
||||
#redirect_stderr=True
|
||||
redirect_stderr=True
|
||||
priority=991
|
||||
stopsignal=HUP
|
||||
stdout_logfile = /srv/newsblur/logs/imageproxy.log
|
||||
environment = IMAGEPROXY_CACHE="memory:200:4h",IMAGEPROXY_ADDR="localhost:4593",IMAGEPROXY_SIGNATUREKEY="@/etc/imageproxy.key",IMAGEPROXY_VERBOSE=1
|
||||
environment = IMAGEPROXY_CACHE="memory:200:4h",IMAGEPROXY_ADDR="localhost:4593",IMAGEPROXY_SIGNATUREKEY="@/etc/imageproxy.key",IMAGEPROXY_VERBOSE=1
|
||||
|
|
Loading…
Add table
Reference in a new issue