Python3 2017.3.19

Source: Internet
Author: User

Today, one night did not get a small thing, only to get out of the write append, and still stupid method, at least die.

1 Global       2Log 127.0.0.1Local23 Daemon4Maxconn 2565Log 127.0.0.1Local2 Info6 Defaults7LogGlobal8 Mode HTTP9 Timeout Connect 5000msTen Timeout Client 50000ms One Timeout Server 50000ms A option Dontlognull -  -Listen stats:8888 the Stats Enable -Stats URI/Admin -Stats Auth admin:1234 -  + frontend oldboy.org -Bind 0.0.0.0:80 + option Httplog A option Httpclose at option Forwardfor -LogGlobal -ACL www hdr_reg (host)-I www.oldboy.org -Use_backend www.oldboy.orgifwww -  - Backend www.oldboy.org inServer 100.1.7.9 100.1.7.9 Weight maxconn 3000 - Global        toLog 127.0.0.1Local2 + Daemon -Maxconn 256 theLog 127.0.0.1Local2 Info * Defaults $LogGlobalPanax Notoginseng Mode HTTP - Timeout Connect 5000ms the Timeout Client 50000ms + Timeout Server 50000ms A option Dontlognull the  +Listen stats:8888 - Stats Enable $Stats URI/Admin $Stats Auth admin:1234 -  - frontend oldboy.org theBind 0.0.0.0:80 - option HttplogWuyi option Httpclose the option Forwardfor -LogGlobal WuACL www hdr_reg (host)-I www.oldboy.org -Use_backend www.oldboy.orgifwww About  $ Backend www.oldboy.org -Server 100.1.7.9 100.1.7.9 Weight maxconn 3000 - Global        -Log 127.0.0.1Local2 A Daemon +Maxconn 256 theLog 127.0.0.1Local2 Info - Defaults $LogGlobal the Mode HTTP the Timeout Connect 5000ms the Timeout Client 50000ms the Timeout Server 50000ms - option Dontlognull in  theListen stats:8888 the Stats Enable AboutStats URI/Admin theStats Auth admin:1234 the  the frontend oldboy.org +Bind 0.0.0.0:80 - option Httplog the option HttpcloseBayi option Forwardfor theLogGlobal theACL www hdr_reg (host)-I www.oldboy.org -Use_backend www.oldboy.orgifwww -  the Backend www.oldboy.org theServer 100.1.7.9 100.1.7.9 Weight maxconn 3000 the Global        theLog 127.0.0.1Local2 - Daemon theMaxconn 256 theLog 127.0.0.1Local2 Info the Defaults94LogGlobal the Mode HTTP the Timeout Connect 5000ms the Timeout Client 50000ms98 Timeout Server 50000ms About option Dontlognull - 101Listen stats:8888102 Stats Enable103Stats URI/Admin104Stats Auth admin:1234 the 106 frontend oldboy.org107Bind 0.0.0.0:80108 option Httplog109 option Httpclose the option Forwardfor111LogGlobal theACL www hdr_reg (host)-I www.oldboy.org113Use_backend www.oldboy.orgifwww the  the Backend www.oldboy.org theServer 100.1.7.9 100.1.7.9 Weight maxconn 3000
existing TXT configuration file

Specific is the best one backend modification, append, delete, only out to append, next time pits.

The specific code is as follows

#IncreasedefAdd (a,b,c,d): Backend_new= Open ('Haproxy','A +') Backend_new= Backend_new.write ('backend%s\n\t\tserver%s weight%s Maxconn%s'%(A,b,c,d)) Add (a= Input ('1. Enter backend:'), B= Input ('2. Enter Server:'), C= Input ('3. Enter Weight:'), D= Input ('4. Enter Maxconn:'))

I thought def found the New World ....

Python3 2017.3.19

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.