#GIT
- Modificado (modified);
- Preparado (staged/index)
- Consolidado (comitted);
| # A basic setup for the edge | |
| # Strips cookies and un-needed params | |
| # Does a few redirects | |
| # Sets forwarded proxy headers | |
| # Custom error page | |
| vcl 4.0; | |
| import std; | |
| # Backend setup | |
| backend default { |
| # A heavily customized VCL to support WordPress | |
| # Some items of note: | |
| # Supports https | |
| # Supports admin cookies for wp-admin | |
| # Caches everything | |
| # Support for custom error html page | |
| vcl 4.0; | |
| import directors; | |
| import std; |
| # This is a Wordpress-optimised VCL configuration file for varnish. | |
| backend default { | |
| .host = "127.0.0.1"; | |
| .port = "8080"; | |
| .connect_timeout = 600s; | |
| .first_byte_timeout = 600s; | |
| .between_bytes_timeout = 600s; | |
| .max_connections = 800; | |
| } |
| #!/bin/bash | |
| # You might have to install a new version of rsync for this to work. | |
| # This is easily done by `brew install rsync` and restarting your terminal. | |
| # To use a file as an exclude-list you can use the option | |
| # --exclude-from='donot-deploy.txt' | |
| # Change these to match your settings | |
| USER_NAME='username' |
| # Automated AMI Backups | |
| # | |
| # @author Robert Kozora <bobby@kozora.me> | |
| # | |
| # This script will search for all instances having a tag with "Backup" or "backup" | |
| # on it. As soon as we have the instances list, we loop through each instance | |
| # and create an AMI of it. Also, it will look for a "Retention" tag key which | |
| # will be used as a retention policy number in days. If there is no tag with | |
| # that name, it will use a 7 days default value for each AMI. | |
| # |
echo "\$ModLoad imudp" > /etc/rsyslog.d/server.conf
echo "\$UDPServerRun 514" >> /etc/rsyslog.d/server.conf
echo "\$ModLoad imtcp" >> /etc/rsyslog.d/server.conf
echo "\$InputTCPServerRun 514" >> /etc/rsyslog.d/server.conf
echo "\$PreserveFQDN on" >> /etc/rsyslog.d/server.conf
yum -y install rsyslog-gnutls rsyslog-mysql rsyslog-crypto
| #XLarge DBInstanceClassMemory = 15892177440 = 14.8GB | |
| #/32 = 496630545 = 473MB | |
| #/64 = 248315272 = 236MB | |
| #/128 = 124157636 = 118MB | |
| #/256 = 62078818 = 59MB | |
| #/512 = 31039409 = 29MB | |
| #/12582880 = 1263 #default same divisor as max_connections = 4041.6MB = 4237924762 | |
| #/25165760 = 623 # half of max_connections = 1993.6MB | |
| #/50331520 = 315 # quarter of max_connections = 1008MB = 1056964608 | |
| #*(3/4) #default innodb pool size = 11922309120 |
| # filter by request host header | |
| varnishlog -q 'ReqHeader ~ "Host: example.com"' | |
| # filter by request url | |
| varnishlog -q 'ReqURL ~ "^/some/path/"' | |
| # filter by client ip (behind reverse proxy) | |
| varnishlog -q 'ReqHeader ~ "X-Real-IP: .*123.123.123.123"' | |
| # filter by request host header and show request url and referrer header |