NewsBlur/config/debug_haproxy.conf

150 lines
4.7 KiB
Text
Raw Normal View History

2013-03-17 10:28:26 -07:00
global
maxconn 100000
2013-03-17 10:28:26 -07:00
daemon
ca-base /srv/newsblur/config/certificates
crt-base /srv/newsblur/config/certificates
tune.bufsize 32000
tune.maxrewrite 8196
2015-03-16 13:53:04 -07:00
tune.ssl.default-dh-param 2048
log 127.0.0.1 local0 notice
log 127.0.0.1 local1 debug
2013-03-17 10:28:26 -07:00
defaults
log global
maxconn 100000
2013-03-17 10:28:26 -07:00
mode http
option forwardfor
2013-03-17 10:28:26 -07:00
option http-server-close
2014-12-08 14:59:23 -08:00
option httpclose
2013-07-23 18:15:30 -07:00
# option log-health-checks
option log-separate-errors
2013-03-17 11:25:16 -07:00
option httplog
option redispatch
option abortonclose
2013-03-17 10:28:26 -07:00
timeout connect 5s
timeout client 30s
timeout server 30s
timeout tunnel 1h
retries 3
errorfile 502 /srv/newsblur/templates/502.http
errorfile 503 /srv/newsblur/templates/502.http
errorfile 504 /srv/newsblur/templates/502.http
2013-03-17 10:28:26 -07:00
frontend public
bind :80
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
2013-03-17 11:25:16 -07:00
option http-server-close
2013-03-17 10:28:26 -07:00
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 }
use_backend node_socket if { path_beg /socket.io/ }
use_backend node_socket2 if { path_beg /v2/socket.io/ }
2021-01-04 17:55:47 -05:00
use_backend node_socket3 if { path_beg /v3/socket.io/ }
use_backend node_favicon if { path_beg /rss_feeds/icon/ }
2020-05-19 19:15:20 -04:00
use_backend node_text if { path_beg /rss_feeds/original_text_fetcher }
2013-03-17 11:25:16 -07:00
use_backend nginx if { path_beg /media/ }
use_backend nginx if { path_beg /static/ }
use_backend nginx if { path_beg /favicon }
2013-03-17 11:25:16 -07:00
use_backend nginx if { path_beg /crossdomain/ }
use_backend nginx if { path_beg /robots }
2013-03-17 11:25:16 -07:00
use_backend nginx if { path_beg /munin/ }
use_backend nginx if mx_mode
use_backend gunicorn_counts if is_unread_count
use_backend gunicorn unless gunicorn_dead || nginx_dead
2013-03-17 10:28:26 -07:00
backend imageproxy
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 GET /_haproxychk
# http-check expect rstatus 200|503
server push 127.0.0.1:8000 check inter 2000ms
backend node_socket
2013-03-17 10:28:26 -07:00
balance roundrobin
2013-05-01 13:22:03 -07:00
server nodedebug 127.0.0.1:8888 check inter 2000ms
backend node_socket2
balance roundrobin
server nodedebug 127.0.0.1:8888 check inter 2000ms
2021-01-04 17:55:47 -05:00
backend node_socket3
balance roundrobin
server nodedebug 127.0.0.1:8888 check inter 2000ms
backend node_favicon
balance roundrobin
server nodedebug 127.0.0.1:81 check inter 2000ms
2013-03-17 11:25:16 -07:00
2019-04-13 16:01:51 -04:00
backend node_text
balance roundrobin
server nodedebug 127.0.0.1:4040 check inter 2000ms
2013-03-17 10:28:26 -07:00
backend nginx
balance roundrobin
option httpchk GET /_nginxchk
http-check expect rstatus 200|503
2013-05-01 13:22:03 -07:00
server nginxdebug 127.0.0.1:81 check inter 2000ms
2013-03-17 10:28:26 -07:00
2013-03-17 11:25:16 -07:00
backend gunicorn
balance roundrobin
option httpchk GET /_haproxychk
server gunicorndebug 127.0.0.1:8000 check inter 600000ms
2013-03-17 11:25:16 -07:00
2013-06-24 17:59:31 -07:00
backend gunicorn_counts
balance roundrobin
2015-05-07 10:59:38 -07:00
option httpchk GET /_haproxychk
server gunicorndebug 127.0.0.1:8000 check inter 600000ms
2013-06-24 17:59:31 -07:00
backend maintenance
option httpchk HEAD /maintenance
http-check expect status 404
http-check send-state
2013-08-13 15:45:40 -07:00
server nginxdebug 127.0.0.1:81 check inter 2000ms
2015-08-05 19:33:19 -07:00
backend postgres
option httpchk GET /db_check/postgres
2015-11-16 14:27:39 -08:00
server postgres-db01 db_pgsql:5000 check inter 2000ms
2015-08-05 19:33:19 -07:00
backend mongo
option httpchk GET /db_check/mongo
2015-11-16 14:27:39 -08:00
server mongo-db22 db_mongo:5000 check inter 2000ms
2015-08-05 19:33:19 -07:00
backend redis
option httpchk GET /db_check/redis
2015-11-16 14:27:39 -08:00
server redis-db40 db_redis:5000 check inter 2000ms
2015-08-05 19:33:19 -07:00
backend redis_story
option httpchk GET /db_check/redis_story
2015-11-16 14:27:39 -08:00
server redis-story-db42 db_redis_story:5000 check inter 2000ms
2015-08-05 19:33:19 -07:00
backend redis_sessions
option httpchk GET /db_check/redis_sessions
2015-11-16 14:27:39 -08:00
server redis-sess-db41 db_redis_sessions:5000 check inter 2000ms
2015-08-05 19:33:19 -07:00
backend elasticsearch
option httpchk GET /db_check/elasticsearch
2015-11-16 14:27:39 -08:00
server es-db10 db_search:5000 check inter 2000ms
2015-08-05 19:33:19 -07:00
2015-08-05 20:05:54 -07:00
listen stats
2013-03-17 10:28:26 -07:00
bind :1936 ssl crt newsblur.pem
2015-08-05 20:05:54 -07:00
stats enable
stats hide-version
stats realm Haproxy\ Statistics
stats uri /
stats auth sclay:password
stats refresh 15s