This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
iptables -t mangle -A PREROUTING -d VIP.IP.ADDRESS/32 -p tcp -m tcp --dport 80 -j MARK --set-mark 80 | |
iptables -t mangle -A PREROUTING -d VIP.IP.ADDRESS/32 -p tcp -m tcp --dport 443 -j MARK --set-mark 80 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
virtual_server VIP.IP.ADDRESS 0 { | |
delay_loop 5 | |
lb_kind NAT | |
lb_algo lc | |
persistence_timeout 600 | |
protocol TCP | |
real_server SERVER.01.IP 0 { | |
weight 1 | |
HTTP_GET { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
upstream staticcontent { | |
keepalive 128; | |
server backend-01:80 max_fails=5 fail_timeout=15s; | |
server backend-02:80 max_fails=5 fail_timeout=15s; | |
server backend-03:80 max_fails=5 fail_timeout=15s; | |
server backend-04:80 max_fails=5 fail_timeout=15s; | |
} | |
upstream dynamiccontent { | |
keepalive 128; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RewriteEngine on | |
RewriteRule ^([^\s]*)\s(.*)$ $1-$2 [R=301,N,DPI] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Get-NetAdapter | where {$_.status -eq "UP" -and $_.interfacedescription -like "*Multiplex*"} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
New-NetIPAddress -InterfaceIndex IFINDEX -IPAddress IPADDRESS -PrefixLength PREFIX -DefaultGateway GWIPADDRESS |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
upstream webservice-pers { | |
server webservices.remoteserver.com:80 max_fails=0 fail_timeout=30s; | |
keepalive 1024; | |
} | |
server { | |
listen 8080; | |
server_name webservices.localserver.com; | |
location / { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
include_recipe "rsyslog" | |
begin | |
t = resources(:template => "/etc/rsyslog.conf") | |
t.source "rsyslog.conf.erb" | |
t.cookbook "example" | |
rescue Chef::Exceptions::ResourceNotFound | |
Chef::Log.warn "could not find template /etc/rsyslog.conf to modify" | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source s_nginx_20 { pipe("/srv/logs/access.log" program_override("nginx-access-log")); }; | |
source s_nginx_21 { pipe("/srv/logs/error.log" program_override("nginx-error-log")); }; | |
filter f_nginx_20 { match("nginx-access-log" value("PROGRAM")); }; | |
filter f_nginx_21 { match("nginx-error-log" value("PROGRAM")); }; | |
destination d_remote { tcp("central.syslog", port(514)); }; | |
log { source(s_nginx_20); filter(f_nginx_20); destination(d_messages); }; | |
log { source(s_nginx_21); filter(f_nginx_21); destination(d_messages); }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
server_name backend; | |
root /usr/share/nginx/www; | |
index index.html index.html; | |
location / { | |
header_filter_by_lua ' |