....................................../////.===Shadow-Here===./////................................................ > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < ------------------------------------------------------------------------------------------------------------------- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// RIFF¤ WEBPVP8 ˜ ðÑ *ôô>‘HŸK¥¤"§£±¨àð enü¹%½_F‘åè¿2ºQú³íªú`N¿­3ÿƒügµJžaÿ¯ÿ°~¼ÎùnúîÞÖô•òíôÁÉß®Sm¥Ü/ ‡ó˜f£Ùà<˜„xëJ¢Ù€SO3x<ªÔ©4¿+ç¶A`q@Ì“Úñè™ÍÿJÌ´ª-˜ÆtÊÛL]Ïq*‘Ý”ì#ŸÌÏãY]@ê`¿ /ªfkØB4·®£ó z—Üw¥Pxù–ÞLШKÇN¾AkÙTf½è'‰g gÆv›Øuh~ a˜Z— ïj*á¥t d£“uÒ ¨`K˜¹ßþ]b>˜]_ÏÔ6W—è2r4x•íÖ…"ƒÖNîä!¦å Ú}ýxGøÌ —@ ;ÆÚŠ=ɾ1ý8lªË¥ô ^yf®Œ¢u&2©nÙÇ›ñÂñŒ³ aPo['½»øFùà­+4ê“$!lövlüÞ=;N®3ð‚õ›DÉKòÞ>ÄÍ ¥ˆuߤ#ˆ$6ù™¥îЇy’ÍB¼ çxÛ;X"WL£R÷͝*ó-¶Zu}º.s¸sšXqù–DþÿvªhüïwyŸ ¯é³lÀ:KCûÄ£Ëá\…­ ~—ýóî ¼ûûÜTÓüÇy…ŽÆvc»¾×U ñ¸žþоP÷¦ó:Ò¨¨5;Ð#&#ÖúñläÿÁœ GxÉ­/ñ‡áQðìYÉtÒw޼GÔ´zàÒò ð*ëzƒ•4~H]Ø‹f ñÓÈñ`NåWçs'ÆÏW^ø¹!XžµmQ5ÃËoLœÎ: ÞËÍ¥J ù…î èo£ßPÎñ¶ž8.Œ]ʵ~5›ÙË-ù*8ÙÖß±~ ©¹rÓê‚j¶d¸{^Q'˜±Crß ÚH—#¥¥QlÀ×ëã‡DÜ«èî þ&Çæžî;ŽÏºò6ÒLÃXy&ZŒ'j‚¢Ù€IßÚù+–MGi‰*jE€‘JcÜ ÓÌ EÏÚj]o˜ Þr <¾U ûŪæÍ/šÝH¥˜b”¼ ÁñßX GP›ï2›4WŠÏà×£…íÓk†¦H·ÅíMh–*nó÷à]ÁjCº€b7<ب‹¨5車bp2:Á[UªM„QŒçiNMa#<5›áËó¸HýÊ"…×Éw¹¦ì2º–x<›»a±¸3Weü®FÝ⑱ö–î–³|LPÈ~çð~Çå‡|º kD¢µÏàÆAI %1À% ¹Ò – ”ϝS¦‰4&¶£°à Öý”û_Ò Áw°A«Å€?mÇÛgHÉ/8)á¾ÛìáöŽP í¨PŸNÙµº¦‡§Ùš"ÿ«>+ªÕ`Ê÷‡‚ß Õû˜þãÇ-PÍ.¾XV‘€ dÜ"þ4¹ ±Oú‘©t¥¦FªÄÃÄ•b‚znýu½—#cDs˜ÃiÑOˆñ×QO=*IAÊ,¶ŽZƒ;‡wøXè%EÐk:F±Ú” .Ѽ+Áu&Ç`."pÈÉw o&¿dE6‘’EqTuK@Ì¥ã™À(Êk(h‰,H}RÀIXÛš3µ1©_OqÚÒJAñ$ÊÙÜ;D3çŒ[þùœh¬Ã³™ö6ç†NY".Ú‰ï[ªŸŒ '²Ð öø_¨ÂÉ9ué¶³ÒŠõTàîMØ#û¯gN‡bÙ놚X„ö …ÉeüÌ^J ‹€.œ$Æ)βÄeæW#óüßĺŸ€ ÀzwV 9oä»f4V*uB «Ë†¹ì¯žR霓æHXa=&“I4K;¯ç‹h×·"UŠ~<•╪Vêª&ÍSÃÆÅ?ÔqÎ*mTM ˜›µwêd#[C¡©§‘D<©àb†–ÁœøvH/,í:¯( ²£|4-„Æövv„Yͼ™^Á$ˆ„¢Û[6yB.åH*V¨æ?$=˜Ñ€•ñ·­(VlŸ‘ nÀt8W÷´Bûba?q9ú¶Xƒl«ÿ\ù¶’þòUÐj/õ¢Ìµ³g$ƒÎR!¸»|Oߍë’BhîÚÑ¢ñåŒJ„®„£2Ð3•ô02Nt…!£Í]Ïc½Qÿ?ˆ<&ÃA¾Ú,JˆijÌ#5yz„‰Î|ÊŽ5QÏ:‹ÐaóVÔxW—CpeÏzÐïíçôÿÅ_[hãsÐ_/ŽTÝ?BîˆííV$<¿i>²F¬_Eß¿ †bÊŒº­ÿ®Z H“C}”¬,Mp ý/Bá£w>˜YV°aƒúh+cŠ- r/[%|üUMHäQ°X»|û/@|°¥Ð !BÔ Ç¢Ä©š+Õì D«7ìN¶ŽðÔ " ƶ’ÖçtA‰Û×}{tþz­¾GÍ›k¹OEJR$ Â׃ «ëÁ"oÉôž$oUK(Ä)Ãz³Ê-‹êN[Ò3Œñbï8P 4ƒ×q¢bo|?<ÛX¬òÄͰL–±›(™ûG?ýË©ÚÄ–ÂDØÐ_Ç¡ô ¾–ÄÏø ×e8Ë©$ÄF¹Å‹ì[©óìl:F¾f´‹‹Xì²ï®\¬ôùƒ ÿat¥óèÒùHß0äe‚;ü×h:ÆWðHž=Ã8骣"kœ'Y?³}Tûè€>?0l›e1Lòñ„aæKÆw…hÖŠùW…ÈÆÄ0ši·›[pcwËþñiêíY/~-Á5˜!¿†A›™Mÿþ(±“t@â“ö2­´TG5yé]çå僳 .·ÍïçÝ7UÚ±Ð/Nè»,_Ï ùdj7\ï Wì4›„»c¸àešg#ÒÊ⥭áØo5‘?ÌdÝô¯ ¹kzsƒ=´#ëÉK›Ø´±-¥eW?‡çßtòTã…$Ý+qÿ±ƒ÷_3Ô¥í÷:æ–ž<·Ö‡‰Å¢ š‡%Ô—utÌÈìðžgÖÀz²À—ï÷Óîäõ{K'´È÷³yaÏÁjƒô}ž§®æÊydÕÈë5¯èˆõvÕ©ã*çD„ “z„Ó‡^^xÂ3M§A´JG‚öï 3W'ˆ.OvXè¡ÊÕª?5º7†˜(˜Ç¶#çê’¶!ÌdZK§æ 0fãaN]òY³RV ™î$®K2R¨`W!1Ôó\;Ý ýB%qæK•&ÓÈe9È0êI±žeŸß -ú@žQr¦ ö4»M¼Áè¹µmw 9 EÆE_°2ó„ŸXKWÁ×Hóì^´²GѝF©óäR†¦‰ç"V»eØ<3ùd3ÿÚ¤Žú“Gi" —‘_ÙËÎ~Üö¯¥½Î»üŸEÚŽåmÞþí ;ÞólËΦMzA"Âf(´òá;Éï(/7½ûñÌ­cïÕçлþÝz¾-ÍvÑ“pH­–ðÓj$¸Äû¤‚‘ãUBË-n“2åPkS5&‹Â|+g^œ®Ì͆d!OïäîU«c;{Û!ÅŽ«ëZ9Ókóˆ]¯ƒ›né `ÇÒ+tÆš (ØKá¾—=3œ®•vuMñg²\ï Ec€ 05±d™‡×iÇ×›UúvÌ¢£Èþ¡ÕØô¶ßÎA"ß±#Ö²ˆÊŸ¦*Ä~ij|àø.-¼'»Ú¥£h ofº¦‡VsR=N½„Î v˜Z*SÌ{=jÑB‹tê…;’HžH¯8–îDù8ñ¢|Q•bÛçš–‹m³“ê¨ åÏ^m¬Žãþ©ïêO‡½6] µÆ„Ooòü ²x}N¦Ë3ïé¿»€›HA˜m%çÞ/¿í7Fø“‹léUk)É°Œµ8Q8›:ÀŠeT*šõ~ôڝG6 ¢}`ùH­–”¡k ‰P1>š†®9z11!X wKfmÁ¦xÑ,N1Q”–æB¶M…ÒÃv6SMˆhU¬ÊPŽï‘öj=·CŒ¯u¹ƒVIЃsx4’ömÛýcå¡¶7ßŠß 57^\wÒÐÆ k§h,Œý î«q^R½3]J¸ÇðN ‚çU¬ôº^Áì} ³f©Õœ§ˆã:FÄÈ‚é(€™?àýÓüè1Gô£¼éj‚OÅñ  #>×—ßtà 0G¥Åa뀐kßhc™À_ÉñÞ#±)GD" YîäË-ÿÙ̪ ¹™a¯´¢E\ÝÒö‚;™„ë]_ p8‰o¡ñ+^÷ 3‘'dT4œŽ ðVë½° :¬víÑ«£tßÚS-3¶“þ2 †üüʨòrš¹M{É_¤`Û¨0ìjœøJ‡:÷ÃáZ˜†@GP&œÑDGÏs¡þ¦þDGú‘1Yá9Ôþ¼ ûø…§÷8&–ÜÑnÄ_m®^üÆ`;ÉVÁJ£?â€-ßê}suÍ2sõA NÌúA磸‘îÿÚ»ƒìö·á¿±tÑÐ"Tÿü˜[@/äj¬€uüªìù¥Ý˜á8Ý´sõj 8@rˆð äþZÇD®ÿUÏ2ùôõrBzÆÏÞž>Ì™xœ“ wiÎ×7_… ¸ \#€MɁV¶¥üÕÿPÔ9Z‡ø§É8#H:ƒ5ÀÝå9ÍIŒ5åKÙŠ÷qÄ>1AÈøžj"µÂд/ªnÀ qªã}"iŸBå˜ÓÛŽ¦…&ݧ;G@—³b¯“•"´4í¨ôM¨åñC‹ïùÉó¯ÓsSH2Ý@ßáM‡ˆKÀªÛUeø/4\gnm¥‹ŸŒ qÄ b9ÞwÒNÏ_4Ég³ú=܆‚´ •â¥õeíþkjz>éÚyU«Íӝ݃6"8/ø{=Ô¢»G¥ äUw°W«,ô—¿ãㆅү¢³xŠUû™yŒ (øSópÐ 9\åTâ»—*oG$/×ÍT†Y¿1¤Þ¢_‡ ¼ „±ÍçèSaÓ 3ÛMÁBkxs‰’R/¡¤ˆÙçª(*õ„üXÌ´ƒ E§´¬EF"Ù”R/ÐNyÆÂ^°?™6¡œïJ·±$§?º>ÖüœcNÌù¯G ‹ñ2ЁBB„^·úìaz¨k:#¨Æ¨8LÎõލ£^§S&cŒÐU€ü(‡F±Š¼&P>8ÙÁ ‰ p5?0ÊÆƒZl¸aô š¼¡}gÿ¶zÆC²¹¬ÎÖG*HB¡O<º2#ñŒAƒ–¡B˜´É$¥›É:FÀÔx¾u?XÜÏÓvN©RS{2ʈãk9rmP¼Qq̳ è¼ÐFׄ^¡Öì fE“F4A…!ì/…¦Lƒ… … $%´¾yã@CI¬ á—3PþBÏNÿ<ý°4Ü ËÃ#ØÍ~âW«rEñw‹eùMMHß²`¬Öó½íf³:‹k˜¯÷}Z!ã¿<¥,\#öµÀ¯aÒNÆIé,Ћ–lŽ#Àæ9ÀÒS·I’½-Ïp Äz¤Š Â* ­íÄ9­< h>׍3ZkËU¹§˜ŒŠ±f­’¤º³Q ÏB?‹#µíÃ¥®@(Gs«†vI¥Mµ‹Á©e~2ú³ÁP4ìÕi‚²Ê^ö@-DþÓàlÜOÍ]n"µã:žpsŽ¢:! Aõ.ç~ÓBûH÷JCÌ]õVƒd «ú´QÙEA–¯¯Œ!.ˆˆëQ±ù œ·Ì!Õâ )ùL„ÅÀlÚè5@B…o´Æ¸XÓ&Û…O«˜”_#‡ƒ„ûÈt!¤ÁÏ›ÎÝŠ?c9 â\>lÓÁVÄÑ™£eØY]:fÝ–—ù+p{™ðè û³”g±OƒÚSù£áÁÊ„ä,ï7š²G ÕÌBk)~ÑiCµ|h#u¤¶îK¨² #²vݯGãeÖ϶ú…¾múÀ¶þÔñ‚Š9'^($¤§ò “š½{éúp÷J›ušS¹áªCÂubÃH9™D™/ZöØÁ‡¦ÝÙŸ·kð*_”.C‹{áXó€‡c¡c€§/šò/&éš÷,àéJþ‰X›fµ“C¨œ®r¬"kL‰Â_q…Z–.ÉL~O µ›zn‚¹À¦Öª7\àHµšÖ %»ÇníV[¥*Õ;ƒ#½¾HK-ÖIÊdÏEÚ#=o÷Óò³´Š: Ç?{¾+9›–‘OEáU·S€˜j"ÄaÜ ŒÛWt› á–c#a»pÔZÞdŽtWê=9éöÊ¢µ~ ë ;Öe‡Œ®:bî3±ýê¢wà¼îpêñ¹¾4 zc¾ðÖÿzdêŒÑÒŝÀ‰s6¤í³ÎÙB¿OZ”+F¤á‡3@Ñëäg©·Ž ˆèª<ù@É{&S„œÕúÀA)‰h:YÀ5^ÂÓŒ°õäU\ ùËÍû#²?Xe¬tu‰^zÒÔãë¼ÛWtEtû …‚g¶Úüâî*moGè¨7%u!]PhÏd™Ý%Îx: VÒ¦ôÊD3ÀŽKÛËãvÆî…N¯ä>Eró–ð`5 Œ%u5XkñÌ*NU%¶áœÊ:Qÿú»“úzyÏ6å-၇¾ ´ ÒÊ]y žO‘w2Äøæ…H’²f±ÎÇ.ª|¥'gîV•Ü .̘¯€šòü¤U~Ù†*¢!?ò wý,}´°ÔÞnïoKq5µb!áÓ3"vAßH¡³¡·G(ÐÎ0Îò¼MG!/ài®@—¬04*`…«é8ªøøló“ˆÊ”èù¤…ßÊoÿé'ËuÌÖ5×È¡§ˆˆfŽë9}hìâ_!!¯  B&Ëö¶‰ÀAÙNVŸ Wh›¸®XÑJì¨ú“¿÷3uj²˜¨ÍÎìë±aúŠÝå¯ð*Ó¨ôJ“yºØ)m°WýOè68†ŸÏ2—‰Ïüꪫٚ¥‹l1 ø ÏÄFjêµvÌbü¦èÝx:X±¢H=MÐß—,ˆÉÇ´(9ú¾^ÅÚ4¿m‡$âX‘å%(AlZo@½¨UOÌÕ”1ø¸jÎÀÃÃ_ µ‘Ü.œº¦Ut: Æï’!=¯uwû#,“pþÇúŒø(é@?³ü¥‘Mo §—s@Œ#)§ŒùkL}NOÆêA›¸~r½¼ÙA—HJ«eˆÖ´*¡ÓpÌŸö.m<-"³ûÈ$¬_6­åf£ïÚâj1y§ÕJ½@dÞÁr&Í\Z%D£Íñ·AZ Û³øüd/ªAi†/Й~  ‡âĮҮÏh§°b—›Û«mJžòG'[ÈYýŒ¦9psl ýÁ ®±f¦x,‰½tN ‚Xª9 ÙÖH.«Lo0×?͹m¡å†Ѽ+›2ƒF ±Ê8 7Hցϓ²Æ–m9…òŸï]Â1äN†VLâCˆU .ÿ‰Ts +ÅÎx(%¦u]6AF Š ØF鈄‘ |¢¶c±soŒ/t[a¾–û:s·`i햍ê›ËchÈ…8ßÀUÜewŒðNOƒõD%q#éû\9¤x¹&UE×G¥ Í—™$ð E6-‡¼!ýpãÔM˜ Âsìe¯ñµK¢Ç¡ùôléœ4Ö£”À Š®Ðc ^¨À}ÙËŸ§›ºê{ÊuÉC ×Sr€¤’fÉ*j!úÓ’Gsùìoîßîn%ò· àc Wp÷$¨˜)û»H ×8ŽÒ€Zj¤3ÀÙºY'Ql¦py{-6íÔCeiØp‘‡XÊîÆUߢ܂ž£Xé¼Y8þ©ëgñß}é.ÎógÒ„ÃØËø¯»™§Xýy M%@NŠ À(~áÐvu7&•,Ù˜ó€uP‡^^®=_E„jt’ 403WebShell
403Webshell
Server IP : 92.205.13.44  /  Your IP : 216.73.216.81
Web Server : Apache
System : Linux sxb1plzcpnl489958.prod.sxb1.secureserver.net 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
User : assabzbu8efo ( 10079764)
PHP Version : 8.1.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /opt/cpanel/ea-ruby27/root/usr/share/passenger/phusion_passenger/standalone/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/cpanel/ea-ruby27/root/usr/share/passenger/phusion_passenger/standalone//config_options_list.rb
#  Phusion Passenger - https://www.phusionpassenger.com/
#  Copyright (c) 2015-2018 Phusion Holding B.V.
#
#  "Passenger", "Phusion Passenger" and "Union Station" are registered
#  trademarks of Phusion Holding B.V.
#
#  Permission is hereby granted, free of charge, to any person obtaining a copy
#  of this software and associated documentation files (the "Software"), to deal
#  in the Software without restriction, including without limitation the rights
#  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
#  copies of the Software, and to permit persons to whom the Software is
#  furnished to do so, subject to the following conditions:
#
#  The above copyright notice and this permission notice shall be included in
#  all copies or substantial portions of the Software.
#
#  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
#  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
#  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
#  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
#  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
#  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
#  THE SOFTWARE.

PhusionPassenger.require_passenger_lib 'constants'
PhusionPassenger.require_passenger_lib 'platform_info/ruby'

# This file contains a specification of all supported Passenger Standalone
# configuration options. The specifications are spread over multiple constants,
# one for each category. The command line parser for `passenger start` is
# automatically generated from these specifications. The configuration file
# parser and the environment variable parser also use these specifications.
#
# A specification is an array of hashes. The following keys are supported:
#
# - :name
#   The name of the configuration option. If you omit this option, while
#   simultaneously setting the `:cli` option, then it means this configuration
#   option is available as a command line option only.
#
# - :type
#   (default: :string)
#   The value type. Supported types are: :string, :integer, :boolean, :path,
#   :array, :map, :hostname.
#   This is used for determining a default parser and for checking the value.
#
# - :type_desc
#   (default: automatically inferred)
#   A description of the value type, to be used in command line option help
#   messages. For example, the `:address` option should have the type desc
#   `HOST` so that the help message `--address HOST` is generated. Boolean
#   options have a `type_desc` of nil.
#
# - :cli
#   (default: automatically inferred)
#   The name of the corresponding command line option. If not specified, then
#   a default one will be automatically generated form the configuration option
#   name. For example, `:ssl_certificate_path` becomes `--ssl-certificate-path`.
#   If set to nil, then it means there is no corresponding command line option.
#
# - :cli_parser
#   (default: automatically inferred)
#   Command line options are parsed based on the configuration option type.
#   If you want to parse it differently, then you can set this option to a
#   lambda to specify a custom parser.
#
# - :short_cli
#   The name of the corresponding short command line option, if any. For
#   example, the `:address` option should have `short_cli` set to `-a`.
#
# - :desc
#   A description to be displayed in command line options help message.
#
# - :default
#   The default value.
#
# - :min
#   If :type is :integer, then this specifies the minimum accepted value.
#   Has no meaing if :type is not :integer.
#   This value is used by the default CLI parser to check whether the
#   passed argument is acceptable.

module PhusionPassenger
  module Standalone
    # Server configuration options
    SERVER_CONFIG_SPEC = [
      {
        :name      => :address,
        :type      => :hostname,
        :type_desc => 'HOST',
        :short_cli => '-a',
        :default   => '0.0.0.0',
        :desc      => "Bind to the given address.\n" \
                      "Default: %DEFAULT%"
      },
      {
        :name      => :port,
        :type      => :integer,
        :short_cli => '-p',
        :default   => 3000,
        :desc      => 'Use the given port number. Default: %DEFAULT%'
      },
      {
        :name      => :socket_file,
        :type      => :path,
        :type_desc => 'FILE',
        :cli       => '--socket',
        :short_cli => '-S',
        :desc      => "Bind to Unix domain socket instead of TCP\n" \
                      'socket'
      },
      {
        :name      => :socket_backlog,
        :type      => :integer,
        :cli       => '--socket-backlog',
        :desc      => "Override size of the socket backlog.\n" \
                      "Default: #{DEFAULT_SOCKET_BACKLOG}"
      },
      {
        :name      => :ssl,
        :type      => :boolean,
        :desc      => "Enable SSL support (Nginx\n" \
                      'engine only)'
      },
      {
        :name      => :ssl_certificate,
        :type      => :path,
        :desc      => "Specify the SSL certificate path\n" \
                      '(Nginx engine only)'
      },
      {
        :name      => :ssl_certificate_key,
        :type      => :path,
        :desc      => "Specify the SSL key path (Nginx\n" \
                      'engine only)'
      },
      {
        :name      => :ssl_port,
        :type      => :integer,
        :type_desc => 'PORT',
        :desc      => "Listen for SSL on this port, while\n" \
                      "listening for HTTP on the normal port\n" \
                      '(Nginx engine only)'
      },
      {
        :name      => :daemonize,
        :type      => :boolean,
        :short_cli => '-d',
        :desc      => 'Daemonize into the background'
      },
      {
        :name      => :user,
        :type_desc => 'USERNAME',
        :desc      => "User to run as. Ignored unless\n" \
                      'running as root'
      },
      {
        :name      => :log_file,
        :type      => :path,
        :desc      => "Where to write log messages. Default:\n" \
                      'console, or /dev/null when daemonized'
      },
      {
        :name      => :pid_file,
        :type      => :path,
        :desc      => 'Where to store the PID file'
      },
      {
        :name      => :instance_registry_dir,
        :type      => :path,
        :desc      => 'Use the given instance registry directory'
      },
      {
        :name      => :data_buffer_dir,
        :type      => :path,
        :desc      => 'Use the given data buffer directory'
      },
      {
        :name      => :core_file_descriptor_ulimit,
        :type      => :integer,
        :desc      => "Set custom file descriptor ulimit for the\n" \
                      "#{SHORT_PROGRAM_NAME} core"
      }
    ]

    # Application loading configuration options
    APPLICATION_LOADING_CONFIG_SPECS = [
      {
        :name      => :environment,
        :type_desc => 'NAME',
        :short_cli => '-e',
        :default   => ENV['RAILS_ENV'] || ENV['RACK_ENV'] || ENV['NODE_ENV'] ||
          ENV['PASSENGER_APP_ENV'] || 'development',
        :desc      => "Web framework environment. Default:\n" \
                      "%DEFAULT%"
      },
      {
        :name      => :ruby,
        :type_desc => 'FILENAME',
        :desc      => "Executable to use for Ruby apps.\n" \
                      "Default: #{PlatformInfo.ruby_command}\n" \
                      "(current context)"
      },
      {
        :name      => :python,
        :type_desc => 'FILENAME',
        :desc      => 'Executable to use for Python apps'
      },
      {
        :name      => :nodejs,
        :type_desc => 'FILENAME',
        :desc      => 'Executable to use for Node.js apps'
      },
      {
        :name      => :meteor_app_settings,
        :type      => :path,
        :type_desc => 'FILENAME',
        :desc      => "Settings file to use for (development mode)\n" \
                      'Meteor apps'
      },
      {
        :type      => :path,
        :type_desc => 'FILENAME',
        :cli       => '--rackup',
        :short_cli => '-R',
        :cli_parser => lambda do |options, value|
          options[:app_type] = 'rack'
          options[:startup_file] = File.absolute_logical_path(value,
            Dir.logical_pwd)
        end,
        :desc      => "Consider application a Ruby app, and use\n" \
                      'the given rackup file'
      },
      {
        :name      => :app_type,
        :type_desc => 'NAME',
        :desc      => 'Force app to be detected as the given type'
      },
      {
        :name      => :startup_file,
        :type      => :path,
        :type_desc => 'FILENAME',
        :desc      => 'Force given startup file to be used'
      },
      {
        :name      => :app_start_command,
        :type_desc => 'COMMAND',
        :desc      => 'Force the app to be started through this command'
      },
      {
        :name      => :app_support_kuria_protocol,
        :type      => :boolean,
        :desc      => 'Force the app to be recognized as a Kuria app',
      },
      {
        :name      => :spawn_method,
        :type_desc => 'NAME',
        :default   => PlatformInfo.ruby_supports_fork? ? DEFAULT_SPAWN_METHOD : 'direct',
        :desc      => 'The spawn method to use. Default: see docs'
      },
      {
        :name      => :direct_instance_request_address,
        :type      => :hostname,
        :type_desc => 'HOST',
        :default   => '127.0.0.1',
        :desc      => "The address that Passenger binds to in order to allow sending HTTP requests to individual application processes.\nDefault: %DEFAULT%"
      },
      {
        :name      => :static_files_dir,
        :type      => :path,
        :desc      => "Specify the static files dir (Nginx engine\n" \
                      'only)'
      },
      {
        :name      => :restart_dir,
        :type      => :path,
        :desc      => 'Specify the restart dir'
      },
      {
        :name      => :friendly_error_pages,
        :type      => :boolean,
        :desc      => 'Turn on friendly error pages'
      },
      {
        :name      => :custom_error_page,
        :type      => :path,
        :desc      => 'Path to html file to use for Passenger generated error pages'
      },
      {
        :type      => :boolean,
        :cli       => '--no-friendly-error-pages',
        :cli_parser => lambda do |options, value|
          options[:friendly_error_pages] = false
        end,
        :desc      => 'Turn off friendly error pages'
      },
      {
        :name      => :load_shell_envvars,
        :type      => :boolean,
        # The Standalone mode is primarily used for serving a single app (except
        # when in mass deployment mode), so load_shell_envvars is disabled by
        # default. However, it's enabled by default in the Core, so we need to
        # explicitly set it to disabled here.
        :default   => false,
        :desc      => "Load shell startup files before loading\n" \
                      'application'
      },
      {
        :name      => :preload_bundler,
        :type      => :boolean,
        :default   => false,
        :desc      => "Tell Ruby to load the bundler gem before loading the application"
      },
      {
        :name      => :app_file_descriptor_ulimit,
        :type      => :integer,
        :desc      => "Set custom file descriptor ulimit for the\n" \
                      "application"
      },
      {
        :name      => :debugger,
        :type      => :boolean,
        :desc      => 'Enable debugger support'
      },
      {
        :name      => :envvars,
        :type      => :map,
        :type_desc => 'NAME=VALUE',
        :default   => {},
        :cli       => '--envvar',
        :cli_parser => lambda do |options, value|
          if value !~ /=.+/
            abort "*** ERROR: invalid --envvar format: #{value}"
          end
          key, real_value = value.split('=', 2)
          options[:envvars] ||= {}
          options[:envvars][key] = real_value
        end,
        :desc      => 'Pass environment variable to application'
      }
    ]

    # Process management configuration options
    PROCESS_MANAGEMENT_CONFIG_SPECS = [
      {
        :name      => :max_pool_size,
        :type      => :integer,
        :min       => 1,
        :desc      => "Maximum number of application processes.\n" \
                      "Default: #{DEFAULT_MAX_POOL_SIZE}"
      },
      {
        :name      => :min_instances,
        :type      => :integer,
        :min       => 0,
        :desc      => "Minimum number of processes per\n" \
                      'application. Default: 1'
      },
      {
        :name      => :pool_idle_time,
        :type      => :integer,
        :type_desc => 'SECONDS',
        :desc      => "Maximum time that processes may be idle.\n" \
                      "Default: #{DEFAULT_POOL_IDLE_TIME}"
      },
      {
        :name      => :max_preloader_idle_time,
        :type      => :integer,
        :type_desc => 'SECONDS',
        :desc      => "Maximum time that preloader processes may\n" \
                      "be idle. A value of 0 means that preloader\n" \
                      "processes never timeout. Default: #{DEFAULT_MAX_PRELOADER_IDLE_TIME}"
      },
      {
        :name      => :force_max_concurrent_requests_per_process,
        :type      => :integer,
        :desc      => "Force #{SHORT_PROGRAM_NAME} to believe that an\n" \
                      "application process can handle the given\n" \
                      "number of concurrent requests per process"
      },
      {
        :name      => :start_timeout,
        :type      => :integer,
        :type_desc => 'SECONDS',
        :desc      => "The maximum time an application process may\n" \
                      "take to start up, after which it will be killed\n" \
                      "with SIGKILL, and logged with an error.\nDefault: #{DEFAULT_START_TIMEOUT / 1000}"
      },
      {
        :name      => :concurrency_model,
        :type_desc => 'NAME',
        :desc      => "The concurrency model to use, either\n" \
                      "'process' or 'thread' (Enterprise only).\n" \
                      "Default: #{DEFAULT_CONCURRENCY_MODEL}"
      },
      {
        :name      => :thread_count,
        :type      => :integer,
        :desc      => "The number of threads to use when using\n" \
                      "the 'thread' concurrency model (Enterprise\n" \
                      "only). Default: #{DEFAULT_APP_THREAD_COUNT}"
      },
      {
        :name      => :memory_limit,
        :type      => :integer,
        :type_desc => 'MB',
        :desc      => "Restart application processes that go over\n" \
                      "the given memory limit (Enterprise only)"
      },
      {
        :name      => :rolling_restarts,
        :type      => :boolean,
        :desc      => "Enable rolling restarts (Enterprise only)"
      },
      {
        :name      => :resist_deployment_errors,
        :type      => :boolean,
        :desc      => "Enable deployment error resistance\n" \
                      '(Enterprise only)'
      }
    ]

    # Request handling configuration options
    REQUEST_HANDLING_CONFIG_SPECS = [
      {
        :name      => :max_requests,
        :type      => :integer,
        :min       => 0,
        :desc      => "Restart application processes that have handled\n" \
                      "the specified maximum number of requests"
      },
      {
        :name      => :max_request_time,
        :type      => :integer,
        :type_desc => 'SECONDS',
        :min       => 0,
        :desc      => "Abort requests that take too much time\n" \
                      '(Enterprise only)'
      },
      {
        :name      => :max_request_queue_size,
        :type      => :integer,
        :min       => 0,
        :desc      => "Specify request queue size. Default: #{DEFAULT_MAX_REQUEST_QUEUE_SIZE}"
      },
      {
        :name      => :sticky_sessions,
        :type      => :boolean,
        :desc      => 'Enable sticky sessions'
      },
      {
        :name      => :sticky_sessions_cookie_name,
        :type_desc => 'NAME',
        :desc      => "Cookie name to use for sticky sessions.\n" \
                      "Default: #{DEFAULT_STICKY_SESSIONS_COOKIE_NAME}"
      },
      {
        :name      => :sticky_sessions_cookie_attributes,
        :type_desc => "'NAME1=VALUE1; NAME2'",
        :desc      => "The attributes to use for the sticky session cookie.\n" \
                      "Default: #{DEFAULT_STICKY_SESSIONS_COOKIE_ATTRIBUTES}"
      },
      {
        :name      => :vary_turbocache_by_cookie,
        :type_desc => 'NAME',
        :desc      => "Vary the turbocache by the cookie of the\n" \
                      'given name'
      },
      {
        :name      => :turbocaching,
        :type      => :boolean,
        :cli       => nil
      },
      {
        :type      => :boolean,
        :cli       => '--disable-turbocaching',
        :desc      => 'Disable turbocaching',
        :cli_parser => lambda do |options, value|
          options[:turbocaching] = false
        end
      },
      {
        :name      => :unlimited_concurrency_paths,
        :type      => :array,
        :type_desc => 'URI-PATH',
        :cli       => '--unlimited-concurrency-path',
        :desc      => "Specify URI path which supports unlimited\n" \
                      "concurrency. Specify multiple times for\n" \
                      "multiple paths",
        :default   => [],
        :cli_parser => lambda do |options, value|
          options[:unlimited_concurrency_paths] ||= []
          options[:unlimited_concurrency_paths] << value
        end
      },
      {
        :name      => :abort_websockets_on_process_shutdown,
        :type      => :boolean,
        :cli       => nil
      },
      {
        :type      => :boolean,
        :cli       => '--no-abort-websockets-on-process-shutdown',
        :desc      => "Do not abort WebSocket connections on\n" \
                      'process restart',
        :cli_parser => lambda do |options, value|
          options[:abort_websockets_on_process_shutdown] = false
        end
      }
    ]

    # Nginx engine configuration options
    NGINX_ENGINE_CONFIG_SPECS = [
      {
        :name      => :nginx_bin,
        :type      => :path,
        :type_desc => 'FILENAME',
        :desc      => 'Nginx binary to use as core'
      },
      {
        :name      => :nginx_version,
        :type_desc => 'VERSION',
        :default   => PREFERRED_NGINX_VERSION,
        :desc      => "Nginx version to use as core.\n" \
                      "Default: #{PREFERRED_NGINX_VERSION}"
      },
      {
        :name      => :nginx_tarball,
        :type      => :path,
        :type_desc => 'FILENAME',
        :desc      => "If Nginx needs to be installed, then the\n" \
                      "given tarball will be used instead of\n" \
                      "downloading from the Internet"
      },
      {
        :name      => :nginx_config_template,
        :type      => :path,
        :type_desc => 'FILENAME',
        :desc      => "The template to use for generating the\n" \
                      'Nginx config file'
      },
      {
        :name      => :debug_nginx_config,
        :type      => :boolean,
        :desc      => 'Print Nginx config template and exit'
      }
    ]

    # Advanced configuration options
    ADVANCED_CONFIG_SPECS = [
      {
        :name      => :disable_security_update_check,
        :type      => :boolean,
        :desc      => "Disable check for security updates"
      },
      {
        :name      => :security_update_check_proxy,
        :type_desc => 'NAME',
        :desc      => "Use HTTP/SOCKS proxy for the security update check"
      },
      {
        :name      => :disable_anonymous_telemetry,
        :type      => :boolean,
        :desc      => "Disable anonymous telemetry collection"
      },
      {
        :name      => :anonymous_telemetry_proxy,
        :type_desc => 'NAME',
        :desc      => "Use HTTP/SOCKS proxy for anonymous telemetry collection"
      },
      {
        :name      => :engine,
        :type_desc => 'NAME',
        :default   => 'nginx',
        :desc      => "Underlying HTTP engine to use. Available\n" \
                      "options: nginx (default), builtin"
      },
      {
        :name      => :log_level,
        :type      => :integer,
        :default   => DEFAULT_LOG_LEVEL,
        :desc      => "Log level to use. Default: #{DEFAULT_LOG_LEVEL}"
      },
      {
        :name      => :disable_log_prefix,
        :type      => :boolean,
        :desc      => "Disable prefixing log statements with PID and channel."
      },
      {
        :name      => :admin_panel_url,
        :type      => :string,
        :desc      => 'Connect to an admin panel at the given connector URL'
      },
      {
        :name      => :admin_panel_auth_type,
        :type      => :string,
        :desc      => 'Authentication type to use when connecting to the admin panel'
      },
      {
        :name      => :admin_panel_username,
        :type      => :string,
        :desc      => 'Username to use when authenticating with the admin panel'
      },
      {
        :name      => :admin_panel_password,
        :type      => :string,
        :desc      => 'Password to use when authenticating with the admin panel'
      },
      {
        :name      => :auto,
        :type      => :boolean,
        :default   => !STDIN.tty? || !STDOUT.tty?,
        :desc      => "Run in non-interactive mode. Default when\n" \
                      'stdin or stdout is not a TTY'
      },
      {
        :name      => :ctls,
        :type      => :array,
        :type_desc => 'NAME=VALUE',
        :default   => [],
        :cli_parser => lambda do |options, value|
          if value !~ /=.+/
            abort "*** ERROR: invalid --ctl format: #{value}"
          end
          options[:ctls] ||= []
          options[:ctls] << value
        end
      },
      {
        :name      => :binaries_url_root,
        :type_desc => 'URL',
        :desc      => "If Nginx needs to be installed, then the\n" \
                      "specified URL will be checked for binaries\n" \
                      'prior to a local build'
      },
      {
        :name      => :runtime_check_only,
        :type      => :boolean,
        :desc      => "Quit after checking whether the\n" \
                      "#{PROGRAM_NAME} Standalone runtime files\n" \
                      'are installed'
      },
      {
        :name      => :dont_install_runtime,
        :type      => :boolean,
        :cli       => '--no-install-runtime',
        :desc      => 'Abort if runtime must be installed'
      },
      {
        :name      => :dont_compile_runtime,
        :type      => :boolean,
        :cli       => '--no-compile-runtime',
        :desc      => 'Abort if runtime must be compiled'
      }
    ]

    CONFIG_SPECS = [
      SERVER_CONFIG_SPEC,
      APPLICATION_LOADING_CONFIG_SPECS,
      PROCESS_MANAGEMENT_CONFIG_SPECS,
      REQUEST_HANDLING_CONFIG_SPECS,
      NGINX_ENGINE_CONFIG_SPECS,
      ADVANCED_CONFIG_SPECS
    ]

    # Maps configuration options to their default value. Automatically
    # set by code later in this file.
    #
    # To inspect the value of this array, run:
    #
    #   ./dev/runner -r standalone/config_options_list -r pp \
    #     'pp Standalone::CONFIG_DEFAULTS; nil'
    CONFIG_DEFAULTS = {}

    # Indexes all configuration specification items by name.
    #
    # To inspect the value of this array, run:
    #
    #   ./dev/runner -r standalone/config_options_list -r pp \
    #     'pp Standalone::CONFIG_NAME_INDEX; nil'
    CONFIG_NAME_INDEX = {}


    ############


    # Apply transformations on the specification constants, e.g. set default values.

    make_default_type_desc_value = lambda do |spec_item|
      case spec_item[:type]
      when :string
        'STRING'
      when :integer
        'NUMBER'
      when :path
        'PATH'
      when :array
        'ARRAY'
      when :map
        'MAP'
      when :hostname
        'HOSTNAME'
      else
        nil
      end
    end

    make_default_cli_value = lambda do |spec_item|
      '--' + spec_item[:name].to_s.gsub('_', '-')
    end

    CONFIG_SPECS.each do |spec|
      spec.each do |spec_item|
        spec_item[:type] ||= :string
        spec_item[:type_desc] ||= make_default_type_desc_value.call(spec_item)
        if spec_item[:name]
          if !spec_item.key?(:cli)
            spec_item[:cli] = make_default_cli_value.call(spec_item)
          end
          if spec_item.key?(:default)
            CONFIG_DEFAULTS[spec_item[:name]] = spec_item[:default]
          end
          CONFIG_NAME_INDEX[spec_item[:name]] = spec_item
        end
      end
    end
  end
end

Youez - 2016 - github.com/yon3zu
LinuXploit