mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-04-27 03:00:12 -04:00
Restore old runscripts for backwards compatibility.
These are still deprecated, but they are necessary to keep running if you installed before the Natty installer.
This commit is contained in:
74
srv/haproxy/haproxy.conf
Normal file
74
srv/haproxy/haproxy.conf
Normal file
@@ -0,0 +1,74 @@
|
||||
|
||||
global
|
||||
maxconn 100000
|
||||
spread-checks 50
|
||||
#stats socket /tmp/haproxy mode 777
|
||||
|
||||
|
||||
frontend frontend 0.0.0.0:80
|
||||
mode http
|
||||
maxconn 50000
|
||||
timeout client 10000
|
||||
option forwardfor except 127.0.0.1
|
||||
option httpclose
|
||||
|
||||
option httplog
|
||||
log /dev/log local4
|
||||
capture request header User-Agent len 150
|
||||
capture request header Host len 50
|
||||
capture request header Referer len 300
|
||||
capture request header X-Forwarded-For len 15
|
||||
capture request header True-Client-Ip len 15
|
||||
capture request header If-Modified-Since len 50
|
||||
capture cookie reddit_session= len 25
|
||||
|
||||
# make comescore a static thing
|
||||
reqrep ^(.*)/comscore-iframe/(.*) \1/static/comscore.html?path=\2
|
||||
|
||||
|
||||
# make the iphone url pretty
|
||||
reqirep ^GET\ /iphone/(.*) GET\ /static/iphone/\1
|
||||
|
||||
# make the socialite url pretty
|
||||
reqirep ^GET\ /socialite/(.*) GET\ /static/socialite/\1
|
||||
|
||||
# make the redditaddict url pretty
|
||||
reqirep ^GET\ /redditaddict/(.*) GET\ /static/redditaddict/\1
|
||||
|
||||
########
|
||||
# button rewrites
|
||||
reqirep ^GET\ /button\.js\ (.*) GET\ /static/button/button1.js\ \1
|
||||
reqirep ^GET\ /button\.js\?t=([0-9])\ (.*) GET\ /static/button/button\1.js\ \2
|
||||
reqirep ^GET\ /r/(.*)/button\.js\?t=([0-9])\ (.*) GET\ /static/button/button\2.js\ \3
|
||||
reqirep ^GET\ /button\.js\?t=([0-9])&width=[0-9]+&height=[0-9]+\ (.*) GET\ /static/button/button\1.js\ \2
|
||||
|
||||
### acls
|
||||
|
||||
#ssl only to pay urls
|
||||
acl sslrequest src 127.0.0.1
|
||||
acl sslallowed path_beg /promoted
|
||||
acl sslallowed path_beg /static
|
||||
acl sslallowed path_beg /api
|
||||
|
||||
default_backend dynamic
|
||||
|
||||
backend dynamic
|
||||
mode http
|
||||
timeout connect 4000
|
||||
timeout server 30000
|
||||
timeout queue 60000
|
||||
balance roundrobin
|
||||
capture cookie reddit_session= len 25
|
||||
option httpchk GET /health HTTP/1.1\r\nHost:\ reddit.local
|
||||
|
||||
server app01-8001 localhost:8001 maxconn 1 check fall 1
|
||||
server app01-8002 localhost:8002 maxconn 1 check fall 1
|
||||
|
||||
listen stats 0.0.0.0:9000
|
||||
mode http
|
||||
balance
|
||||
timeout client 5000
|
||||
timeout connect 4000
|
||||
timeout server 30000
|
||||
stats uri /haproxy_stats
|
||||
|
||||
3
srv/haproxy/log/run
Executable file
3
srv/haproxy/log/run
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
umask 0027
|
||||
exec setuidgid reddit multilog ./main
|
||||
7
srv/haproxy/run
Executable file
7
srv/haproxy/run
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
ulimit -n 32768
|
||||
|
||||
cd ~reddit
|
||||
exec 2>&1
|
||||
exec /usr/sbin/haproxy -f /home/reddit/srv/haproxy/haproxy.conf
|
||||
Reference in New Issue
Block a user