#上课的时候咩有听太懂, Blur and learn one side
Original file
GlobalLog127.0.0.1local2 Daemon Maxconn256Log127.0.0.1local2 infodefaults LogGlobalmode HTTP Timeout connect 5000ms timeout client 50000ms timeout server 50000ms opt Ion Dontlognulllisten Stats:8888stats enable stats URI/Admin Stats Auth admin:1234frontend oldboy.org Bind0.0.0.0:80option httplog option httpclose option forwardfor logGlobalACL www hdr_reg (host)-i www.oldboy.org use_backend www.oldboy.orgifwwwbackend www.oldboy1.org Server101.1000.7.9 101.1000.7.9 Weight Maxconn 30Server2.2.2.7 2.2.2.7 Weight 4000 maxconnServer10.10.10.1 10.10.10.1 Weight 2000 MaxconnServer2.2.2.5 2.2.2.5 Weight 4000 maxconnBackend www.oldboy2.org Server3.3.3.3 3.3.3.3 Weight Maxconn 3000Backend www.oldboy20.org Server10.10.0.10 10.10.0.10 weight 9999 maxconn 33333333333
Purpose: 1. Make a query for the title and find everything under the heading
2. Making changes to specific items
#[{' Backend ': ' www.oldboy1.org ', ' record ': {' server ': ' 2.2.2.4 ', ' weight ': ' Maxconn ': +}},Modify to {'Backend':'www.oldboy1.org','Record':{'Server':'2.2.2.5','Weight': 30,'Maxconn': 4000}}]
-----have no clue, ING.
2018-06-24-python full Stack development day21-part1-file deletion and modification