/usr/share/doc/libapache2-mod-fcgid/mod_fcgid.html.en is in libapache2-mod-fcgid 1:2.3.9-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 | <?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><!--
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
This file is generated from xml source: DO NOT EDIT
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
-->
<title>mod_fcgid - Apache HTTP Server</title>
<link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
<link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
<link href="../images/favicon.ico" rel="shortcut icon" /></head>
<body>
<div id="page-header">
<p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p>
<p class="apache">Apache HTTP Server Version 2.4</p>
<img alt="" src="../images/feather.gif" /></div>
<div class="up"><a href="./"><img title="<-" alt="<-" src="../images/left.gif" /></a></div>
<div id="path">
<a href="http://www.apache.org/">Apache</a> > <a href="http://httpd.apache.org/">HTTP Server</a> > <a href="http://httpd.apache.org/docs/">Documentation</a> > <a href="../">Version 2.4</a> > <a href="./">Modules</a></div>
<div id="page-content">
<div id="preamble"><h1>Apache Module mod_fcgid</h1>
<div class="toplang">
<p><span>Available Languages: </span><a href="../en/mod/mod_fcgid.html" title="English"> en </a></p>
</div>
<table class="module"><tr><th><a href="module-dict.html#Description">Description:</a></th><td>Provides for execution of FastCGI applications</td></tr>
<tr><th><a href="module-dict.html#Status">Status:</a></th><td>External</td></tr>
<tr><th><a href="module-dict.html#ModuleIdentifier">Module Identifier:</a></th><td>fcgid_module</td></tr>
<tr><th><a href="module-dict.html#SourceFile">Source File:</a></th><td>mod_fcgid.c</td></tr>
<tr><th><a href="module-dict.html#Compatibility">Compatibility:</a></th><td>Apache 2.0 and higher</td></tr></table>
<h3>Summary</h3>
<p>Any program assigned to the handler <code>fcgid-script</code> is processed
using the FastCGI protocol; <code class="module"><a href="../mod/mod_fcgid.html">mod_fcgid</a></code> starts a sufficient
number instances of the program to handle concurrent requests, and these
programs remain running to handle further incoming requests. This is
significantly faster than using the default <code class="module"><a href="../mod/mod_cgi.html">mod_cgi</a></code> or
<code class="module"><a href="../mod/mod_cgid.html">mod_cgid</a></code> modules to launch the program upon each request.
However, the programs invoked by <code class="module"><a href="../mod/mod_fcgid.html">mod_fcgid</a></code> continue to
consume resources, so the administrator must weigh the impact of invoking
a particular program once per request against the resources required to
leave a sufficient number of instances running continuously.</p>
<p>The pool of fcgid-invoked programs is shared between all httpd workers.
Configuration directives below let the administrator tune the number of
instances of the program that will run concurrently.</p>
<p>Specific executables are assigned this handler either by having a name
containing an extension defined by the
<code class="directive"><a href="../mod/mod_mime.html#addhandler">AddHandler</a></code> directive, or with an
override using the <code class="directive"><a href="../mod/mod_mime.html#sethandler">SetHandler</a></code>
directive (e.g., for all files in a specific directory such as cgi-bin).</p>
<p>Some changes have been made in the ASF release of mod_fcgid which
can affect existing configurations. All documentation refers to new
names for the directives. (The old names still work but are now
deprecated.) Please read the <a href="#upgrade">Upgrade Notes</a> for
details.</p>
<p>For an introduction to using CGI scripts with Apache, see
the generic tutorial on <a href="../howto/cgi.html">Dynamic Content
With CGI</a>.</p>
</div>
<div id="quickview"><h3 class="directives">Directives</h3>
<ul id="toc">
<li><img alt="" src="../images/down.gif" /> <a href="#fcgidaccesschecker">FcgidAccessChecker</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#fcgidaccesscheckerauthoritative">FcgidAccessCheckerAuthoritative</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#fcgidauthenticator">FcgidAuthenticator</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#fcgidauthenticatorauthoritative">FcgidAuthenticatorAuthoritative</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#fcgidauthorizer">FcgidAuthorizer</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#fcgidauthorizerauthoritative">FcgidAuthorizerAuthoritative</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#fcgidbusyscaninterval">FcgidBusyScanInterval</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#fcgidbusytimeout">FcgidBusyTimeout</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#fcgidcmdoptions">FcgidCmdOptions</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#fcgidconnecttimeout">FcgidConnectTimeout</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#fcgiderrorscaninterval">FcgidErrorScanInterval</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#fcgidfixpathinfo">FcgidFixPathinfo</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#fcgididlescaninterval">FcgidIdleScanInterval</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#fcgididletimeout">FcgidIdleTimeout</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#fcgidinitialenv">FcgidInitialEnv</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#fcgidiotimeout">FcgidIOTimeout</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#fcgidipcdir">FcgidIPCDir</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#fcgidmaxprocesses">FcgidMaxProcesses</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#fcgidmaxprocessesperclass">FcgidMaxProcessesPerClass</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#fcgidmaxrequestinmem">FcgidMaxRequestInMem</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#fcgidmaxrequestlen">FcgidMaxRequestLen</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#fcgidmaxrequestsperprocess">FcgidMaxRequestsPerProcess</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#fcgidminprocessesperclass">FcgidMinProcessesPerClass</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#fcgidoutputbuffersize">FcgidOutputBufferSize</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#fcgidpassheader">FcgidPassHeader</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#fcgidprocesslifetime">FcgidProcessLifeTime</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#fcgidprocesstablefile">FcgidProcessTableFile</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#fcgidspawnscore">FcgidSpawnScore</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#fcgidspawnscoreuplimit">FcgidSpawnScoreUpLimit</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#fcgidterminationscore">FcgidTerminationScore</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#fcgidtimescore">FcgidTimeScore</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#fcgidwin32preventorphans">FcgidWin32PreventOrphans</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#fcgidwrapper">FcgidWrapper</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#fcgidzombiescaninterval">FcgidZombieScanInterval</a></li>
</ul>
<h3>Topics</h3>
<ul id="topics">
<li><img alt="" src="../images/down.gif" /> <a href="#upgrade">Upgrade Notes</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#examples">Examples</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#process-mgmt">Process Management</a></li>
</ul><h3>See also</h3>
<ul class="seealso">
<li><a href="../howto/cgi.html">Dynamic Content With CGI</a></li>
<li><code class="module"><a href="../mod/mod_cgi.html">mod_cgi</a></code></li>
<li><code class="module"><a href="../mod/mod_cgid.html">mod_cgid</a></code></li>
</ul></div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="section">
<h2><a name="upgrade" id="upgrade">Upgrade Notes</a></h2>
<p>The following changes have been made in the ASF release of mod_fcgid
and should be considered when upgrading from the original version by
Ryan Pan (Pan Qingfeng).</p>
<ul>
<li>All directives have been renamed in order to use a common prefix "Fcgid".
Underscores in directive names have been eliminated in favor of
CamelCase. The old directive names will still work but are deprecated.
To fix your configuration you can use the sed script build/fixconf.sed.
The following table contains old and new directive names:
<table class="bordered"><tr class="header"><th>Old Name</th><th>New Name</th></tr>
<tr>
<td><code class="directive">BusyScanInterval</code></td>
<td><code class="directive"><a href="#fcgidbusyscaninterval">FcgidBusyScanInterval</a></code></td>
</tr>
<tr class="odd">
<td><code class="directive">BusyTimeout</code></td>
<td><code class="directive"><a href="#fcgidbusytimeout">FcgidBusyTimeout</a></code></td>
</tr>
<tr>
<td><code class="directive">DefaultInitEnv</code></td>
<td><code class="directive"><a href="#fcgidinitialenv">FcgidInitialEnv</a></code></td>
</tr>
<tr class="odd">
<td><code class="directive">DefaultMaxClassProcessCount</code></td>
<td><code class="directive"><a href="#fcgidmaxprocessesperclass">FcgidMaxProcessesPerClass</a></code></td>
</tr>
<tr>
<td><code class="directive">DefaultMinClassProcessCount</code></td>
<td><code class="directive"><a href="#fcgidminprocessesperclass">FcgidMinProcessesPerClass</a></code></td>
</tr>
<tr class="odd">
<td><code class="directive">ErrorScanInterval</code></td>
<td><code class="directive"><a href="#fcgiderrorscaninterval">FcgidErrorScanInterval</a></code></td>
</tr>
<tr>
<td><code class="directive">FastCgiAccessChecker</code></td>
<td><code class="directive"><a href="#fcgidaccesschecker">FcgidAccessChecker</a></code></td>
</tr>
<tr class="odd">
<td><code class="directive">FastCgiAccessCheckerAuthoritative</code></td>
<td><code class="directive"><a href="#fcgidaccesscheckerauthoritative">FcgidAccessCheckerAuthoritative</a></code></td>
</tr>
<tr>
<td><code class="directive">FastCgiAuthenticator</code></td>
<td><code class="directive"><a href="#fcgidauthenticator">FcgidAuthenticator</a></code></td>
</tr>
<tr class="odd">
<td><code class="directive">FastCgiAuthenticatorAuthoritative</code></td>
<td><code class="directive"><a href="#fcgidauthenticatorauthoritative">FcgidAuthenticatorAuthoritative</a></code></td>
</tr>
<tr>
<td><code class="directive">FastCgiAuthorizer</code></td>
<td><code class="directive"><a href="#fcgidauthorizer">FcgidAuthorizer</a></code></td>
</tr>
<tr class="odd">
<td><code class="directive">FastCgiAuthorizerAuthoritative</code></td>
<td><code class="directive"><a href="#fcgidauthorizerauthoritative">FcgidAuthorizerAuthoritative</a></code></td>
</tr>
<tr>
<td><code class="directive">FCGIWrapper</code></td>
<td><code class="directive"><a href="#fcgidwrapper">FcgidWrapper</a></code></td>
</tr>
<tr class="odd">
<td><code class="directive">IdleScanInterval</code></td>
<td><code class="directive"><a href="#fcgididlescaninterval">FcgidIdleScanInterval</a></code></td>
</tr>
<tr>
<td><code class="directive">IdleTimeout</code></td>
<td><code class="directive"><a href="#fcgididletimeout">FcgidIdleTimeout</a></code></td>
</tr>
<tr class="odd">
<td><code class="directive">IPCCommTimeout</code></td>
<td><code class="directive"><a href="#fcgidiotimeout">FcgidIOTimeout</a></code></td>
</tr>
<tr>
<td><code class="directive">IPCConnectTimeout</code></td>
<td><code class="directive"><a href="#fcgidconnecttimeout">FcgidConnectTimeout</a></code></td>
</tr>
<tr class="odd">
<td><code class="directive">MaxProcessCount</code></td>
<td><code class="directive"><a href="#fcgidmaxprocesses">FcgidMaxProcesses</a></code></td>
</tr>
<tr>
<td><code class="directive">MaxRequestInMem</code></td>
<td><code class="directive"><a href="#fcgidmaxrequestinmem">FcgidMaxRequestInMem</a></code></td>
</tr>
<tr class="odd">
<td><code class="directive">MaxRequestLen</code></td>
<td><code class="directive"><a href="#fcgidmaxrequestlen">FcgidMaxRequestLen</a></code></td>
</tr>
<tr>
<td><code class="directive">MaxRequestsPerProcess</code></td>
<td><code class="directive"><a href="#fcgidmaxrequestsperprocess">FcgidMaxRequestsPerProcess</a></code></td>
</tr>
<tr class="odd">
<td><code class="directive">OutputBufferSize</code></td>
<td><code class="directive"><a href="#fcgidoutputbuffersize">FcgidOutputBufferSize</a></code></td>
</tr>
<tr>
<td><code class="directive">PassHeader</code></td>
<td><code class="directive"><a href="#fcgidpassheader">FcgidPassHeader</a></code></td>
</tr>
<tr class="odd">
<td><code class="directive">PHP_Fix_Pathinfo_Enable</code></td>
<td><code class="directive"><a href="#fcgidfixpathinfo">FcgidFixPathinfo</a></code></td>
</tr>
<tr>
<td><code class="directive">ProcessLifeTime</code></td>
<td><code class="directive"><a href="#fcgidprocesslifetime">FcgidProcessLifeTime</a></code></td>
</tr>
<tr class="odd">
<td><code class="directive">SharememPath</code></td>
<td><code class="directive"><a href="#fcgidprocesstablefile">FcgidProcessTableFile</a></code></td>
</tr>
<tr>
<td><code class="directive">SocketPath</code></td>
<td><code class="directive"><a href="#fcgidipcdir">FcgidIPCDir</a></code></td>
</tr>
<tr class="odd">
<td><code class="directive">SpawnScore</code></td>
<td><code class="directive"><a href="#fcgidspawnscore">FcgidSpawnScore</a></code></td>
</tr>
<tr>
<td><code class="directive">SpawnScoreUpLimit</code></td>
<td><code class="directive"><a href="#fcgidspawnscoreuplimit">FcgidSpawnScoreUpLimit</a></code></td>
</tr>
<tr class="odd">
<td><code class="directive">TerminationScore</code></td>
<td><code class="directive"><a href="#fcgidterminationscore">FcgidTerminationScore</a></code></td>
</tr>
<tr>
<td><code class="directive">TimeScore</code></td>
<td><code class="directive"><a href="#fcgidtimescore">FcgidTimeScore</a></code></td>
</tr>
<tr class="odd">
<td><code class="directive">ZombieScanInterval</code></td>
<td><code class="directive"><a href="#fcgidzombiescaninterval">FcgidZombieScanInterval</a></code></td>
</tr>
</table>
</li>
</ul>
</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="section">
<h2><a name="examples" id="examples">Examples</a></h2>
<div class="note"><h3>Note</h3>
<p>The examples assume that mod_fcgid and other necessary
modules are loaded into the server already, either built-in or
via the <code class="directive"><a href="../mod/mod_so.html#loadmodule">LoadModule</a></code>
directive.</p>
<p>Additionally, the example configurations provide full access
to the applications using access control directives which work
with Apache 2.0 and 2.2. These directives are not appropriate
for all environments, and they do not work for development
levels of Apache HTTP Server (Subversion trunk).</p>
</div>
<p>The first example is a very simple Perl FastCGI application,
and its configuration directives. This is typical for FastCGI
applications which require no special configuration.</p>
<div class="example"><h3>Perl FastCGI application - /usr/local/apache/fcgi-bin/foo.pl</h3><p><code>
#!/usr/bin/perl<br />
use CGI::Fast;<br />
<br />
while (my $q = CGI::Fast->new) {<br />
<span class="indent">
print("Content-Type: text/plain\n\n");<br />
foreach $var (sort(keys(%ENV))) {<br />
<span class="indent">
$val = $ENV{$var};<br />
$val =~ s|\n|\\n|g;<br />
$val =~ s|"|\\"|g;<br />
print "${var}=\"${val}\"\n";<br />
</span>
}<br />
</span>
}<br />
</code></p></div>
<div class="example"><h3>Configuration directives</h3><p><code>
<Directory /usr/local/apache/fcgi-bin/><br />
<span class="indent">
SetHandler fcgid-script<br />
Options +ExecCGI<br />
<br />
# Customize the next two directives for your requirements.<br />
Order allow,deny<br />
Allow from all<br />
</span>
</Directory><br />
</code></p></div>
<p>PHP applications are usually configured using the
<code class="directive"><a href="#fcgidwrapper">FcgidWrapper</a></code> directive
and a corresponding wrapper script. The wrapper script can be
an appropriate place to define any environment variables required
by the application, such as <code>PHP_FCGI_MAX_REQUESTS</code>
or anything else. (Environment variables can also be set with
<code class="directive"><a href="#fcgidinitialenv">FcgidInitialEnv</a></code>,
but they then apply to all applications.)</p>
<p>Here is an example that uses a wrapper script to invoke PHP:</p>
<div class="example"><h3>PHP application - /usr/local/phpapp/phpinfo.php</h3><p><code>
<?php<br />
<span class="indent">
phpinfo();<br />
</span>
?><br />
</code></p></div>
<div class="example"><h3>Configuration directives</h3><p><code>
# FcgidMaxRequestsPerProcess should be <= PHP_FCGI_MAX_REQUESTS<br />
# The example PHP wrapper script overrides the default PHP setting.<br />
FcgidMaxRequestsPerProcess 10000<br />
<br />
# Uncomment the following line if cgi.fix_pathinfo is set to 1 in<br />
# php.ini:<br />
# FcgidFixPathinfo 1<br />
<br />
Alias /phpapp/ /usr/local/phpapp/<br />
<Location /phpapp/><br />
<span class="indent">
AddHandler fcgid-script .php<br />
Options +ExecCGI<br />
FcgidWrapper /usr/local/bin/php-wrapper .php<br />
<br />
# Customize the next two directives for your requirements.<br />
Order allow,deny<br />
Allow from all<br />
</span>
</Location><br />
</code></p></div>
<div class="example"><h3>PHP wrapper script - /usr/local/bin/php-wrapper</h3><p><code>
#!/bin/sh<br />
# Set desired PHP_FCGI_* environment variables.<br />
# Example:<br />
# PHP FastCGI processes exit after 500 requests by default.<br />
PHP_FCGI_MAX_REQUESTS=10000<br />
export PHP_FCGI_MAX_REQUESTS<br />
<br />
# Replace with the path to your FastCGI-enabled PHP executable<br />
exec /usr/local/bin/php-cgi<br />
</code></p></div>
<div class="note"><h3>Special PHP considerations</h3>
<p>By default, PHP FastCGI processes exit after handling 500
requests, and they may exit after this module has already
connected to the application and sent the next request. When that
occurs, an error will be logged and <code>500 Internal Server
Error</code> will be returned to the client. This PHP behavior
can be disabled by setting <code>PHP_FCGI_MAX_REQUESTS</code> to
0, but that can be a problem if the PHP application leaks
resources. Alternatively, <code>PHP_FCGI_MAX_REQUESTS</code> can
be set to a much higher value than the default to reduce the
frequency of this problem.
<code class="directive"><a href="#fcgidmaxrequestsperprocess">FcgidMaxRequestsPerProcess</a></code>
can be set to a value less than or equal to
<code>PHP_FCGI_MAX_REQUESTS</code> to resolve the problem.</p>
<p>PHP child process management (<code>PHP_FCGI_CHILDREN</code>)
should always be disabled with mod_fcgid, which will only route
one request at a time to application processes it has spawned;
thus, any child processes created by PHP will not be used
effectively. (Additionally, the PHP child processes may not be
terminated properly.) By default, and with the environment
variable setting <code>PHP_FCGI_CHILDREN=0</code>, PHP child
process management is disabled.</p>
<p>The popular APC opcode cache for PHP cannot share a cache
between PHP FastCGI processes unless PHP manages the child
processes. Thus, the effectiveness of the cache is limited with
mod_fcgid; concurrent PHP requests will use different opcode
caches.</p>
</div>
</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="section">
<h2><a name="process-mgmt" id="process-mgmt">Process Management</a></h2>
<p>mod_fcgid has several types of controls which affect the creation
of additional application processes:</p>
<table class="bordered"><tr class="header"><th>Type of control</th><th>Directive</th></tr>
<tr>
<td>global limit on number of processes</td>
<td><code class="directive"><a href="#fcgidmaxprocesses">FcgidMaxProcesses</a></code></td>
</tr>
<tr class="odd">
<td>limit on number of processes per application</td>
<td><code class="directive"><a href="#fcgidmaxprocessesperclass">FcgidMaxProcessesPerClass</a></code></td>
</tr>
<tr>
<td>limit on rate of spawning new application processes</td>
<td><code class="directive"><a href="#fcgidspawnscoreuplimit">FcgidSpawnScoreUpLimit</a></code> and
other score-related directives</td>
</tr>
</table>
<p>mod_fcgid has several types of controls which affect the termination
of existing application processes:</p>
<table class="bordered"><tr class="header"><th>Type of control</th><th>Directive</th></tr>
<tr>
<td>termination after an idle period</td>
<td><code class="directive"><a href="#fcgididletimeout">FcgidIdleTimeout</a></code></td>
</tr>
<tr class="odd">
<td>termination after it handles a certain number of requests</td>
<td><code class="directive"><a href="#fcgidmaxrequestsperprocess">FcgidMaxRequestsPerProcess</a></code></td>
</tr>
<tr>
<td>termination after a certain lifetime</td>
<td><code class="directive"><a href="#fcgidprocesslifetime">FcgidProcessLifetime</a></code></td>
</tr>
</table>
<p>Several of the directives control processing for a <em>process
class</em>. A process class is the set of processes which were started
with the same executable file and share certain other characteristics such
as virtual host and identity. Two commands which are links to or otherwise
refer to the same executable file share the same process class.</p>
<div class="note"><h3>Note</h3>
<p>Certain settings or other concepts that depend on the virtual host,
such as <code class="directive"><a href="#fcgidinitialenv">FcgidInitialEnv</a></code>
or process classes, distinguish between virtual hosts only if they
have distinct server names. (See the <code class="directive">ServerName</code>
documentation for more information.) In the case of
<code class="directive"><a href="#fcgidinitialenv">FcgidInitialEnv</a></code>, if two
virtual hosts have the same server name but different environments as
defined by
<code class="directive"><a href="#fcgidinitialenv">FcgidInitialEnv</a></code>, the
environment used for a particular request will be that defined for the
virtual host of the request that caused the FastCGI process to be
started.</p>
</div>
<p>Information about each process will be displayed in the
<code class="module"><a href="../mod/mod_status.html">mod_status</a></code> server-status page.</p>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="FcgidAccessChecker" id="FcgidAccessChecker">FcgidAccessChecker</a> <a name="fcgidaccesschecker" id="fcgidaccesschecker">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>full path to FastCGI access checker</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>FcgidAccessChecker <em>command</em></code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>none</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory, .htaccess</td></tr>
<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>External</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_fcgid</td></tr>
</table>
<p>Access checking or, more formally, access control, is a procedure
which verifies that the client is allowed to access a resource, using
some mechanism other than authentication and authorization.</p>
<p>Key environment variables passed to the application for access
checking are:</p>
<dl>
<dt><code>FCGI_APACHE_ROLE</code></dt>
<dd>set to <code>ACCESS_CHECKER</code>; by checking the current role,
the same FastCGI application can handle multiple stages of request
processing</dd>
</dl>
<p>The application must output a <code>Status</code> line to indicate
the result of the check.</p>
<div class="warning"><h3>Warning</h3>
<p>Before 2.3.6, only one FastCGI application of any type (AAA or handler)
can be used for a particular request URI. Otherwise, the wrong FastCGI
application may be invoked for one or more phases of request processing.</p>
</div>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="FcgidAccessCheckerAuthoritative" id="FcgidAccessCheckerAuthoritative">FcgidAccessCheckerAuthoritative</a> <a name="fcgidaccesscheckerauthoritative" id="fcgidaccesscheckerauthoritative">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Set to 'off' to allow access control to be passed along to lower modules upon failure</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>FcgidAccessCheckerAuthoritative <em>On|Off</em></code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>FcgidAccessCheckerAuthoritative On</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory, .htaccess</td></tr>
<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>External</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_fcgid</td></tr>
</table>
<p>This directive controls whether or not other access checkers
are allowed to run when this module has an access checker configured
and it fails a request. If this directive is <code>On</code> (default)
and a FastCGI access checker returns a failure status, a failure is
returned to the client without giving other access checkers a chance to
allow access. If this directive is <code>Off</code>, other access
checkers will be called.</p>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="FcgidAuthenticator" id="FcgidAuthenticator">FcgidAuthenticator</a> <a name="fcgidauthenticator" id="fcgidauthenticator">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>full path to FastCGI authenticator</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>FcgidAuthenticator <em>command</em></code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>none</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory, .htaccess</td></tr>
<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>External</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_fcgid</td></tr>
</table>
<p>Authentication is the procedure which verifies that the user is
who they claim they are. This directive specifies the full path to
a FastCGI application which will handle authentication for a particular
context, such as a directory.</p>
<p>Key environment variables passed to the application on authentication
are:</p>
<dl>
<dt><code>REMOTE_USER</code></dt>
<dd>set to the user id of the client</dd>
<dt><code>REMOTE_PASSWD</code></dt>
<dd>set to the plain text password provided by the client</dd>
<dt><code>FCGI_APACHE_ROLE</code></dt>
<dd>set to <code>AUTHENTICATOR</code>; by checking the current role,
the same FastCGI application can handle multiple stages of request
processing</dd>
</dl>
<p>The application must output a <code>Status</code> line to indicate
the result of authentication.</p>
<div class="warning"><h3>Warning</h3>
<p>Before 2.3.6, only one FastCGI application of any type (AAA or handler)
can be used for a particular request URI. Otherwise, the wrong FastCGI
application may be invoked for one or more phases of request processing.</p>
</div>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="FcgidAuthenticatorAuthoritative" id="FcgidAuthenticatorAuthoritative">FcgidAuthenticatorAuthoritative</a> <a name="fcgidauthenticatorauthoritative" id="fcgidauthenticatorauthoritative">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Set to 'off' to allow authentication to be passed along to lower modules upon failure</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>FcgidAuthenticatorAuthoritative <em>On|Off</em></code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>FcgidAuthenticatorAuthoritative On</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory, .htaccess</td></tr>
<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>External</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_fcgid</td></tr>
</table>
<p>This directive controls whether or not other authenticators
are allowed to run when this module has an authenticator configured
and it fails a request. If this directive is <code>On</code> (default)
and a FastCGI authenticator returns a failure status, a failure is
returned to the client without giving other authenticators a chance to
validate the client identity. If this directive is <code>Off</code>,
other authenticators will be called.</p>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="FcgidAuthorizer" id="FcgidAuthorizer">FcgidAuthorizer</a> <a name="fcgidauthorizer" id="fcgidauthorizer">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>full path to FastCGI authorizer</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>FcgidAuthorizer <em>command</em></code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>none</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory, .htaccess</td></tr>
<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>External</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_fcgid</td></tr>
</table>
<p>Authorization is the procedure which verifies that the user is
allowed to access a particular resource. This directive specifies
the full path to a FastCGI application which will handle authorization
for a particular context, such as a directory.</p>
<p>Key environment variables passed to the application on authorization
are:</p>
<dl>
<dt><code>REMOTE_USER</code></dt>
<dd>set to the user id of the client, which has already been
authenticated</dd>
<dt><code>FCGI_APACHE_ROLE</code></dt>
<dd>set to <code>AUTHORIZER</code>; by checking the current role, the
same FastCGI application can handle multiple stages of request
processing</dd>
</dl>
<p>The application must output a <code>Status</code> line to indicate
the result of authorization.</p>
<div class="warning"><h3>Warning</h3>
<p>Before 2.3.6, only one FastCGI application of any type (AAA or handler)
can be used for a particular request URI. Otherwise, the wrong FastCGI
application may be invoked for one or more phases of request processing.</p>
</div>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="FcgidAuthorizerAuthoritative" id="FcgidAuthorizerAuthoritative">FcgidAuthorizerAuthoritative</a> <a name="fcgidauthorizerauthoritative" id="fcgidauthorizerauthoritative">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Set to 'off' to allow authorization to be passed along to lower modules upon failure</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>FcgidAuthorizerAuthoritative <em>On|Off</em></code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>FcgidAuthorizerAuthoritative On</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory, .htaccess</td></tr>
<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>External</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_fcgid</td></tr>
</table>
<p>This directive controls whether or not other authorizers
are allowed to run when this module has an authorizer configured
and it fails a request. If this directive is <code>On</code> (default)
and a FastCGI authorizer returns a failure status, a failure is
returned to the client without giving other authorizer a chance to
access the resource. If this directive is <code>Off</code>, other
authorizers will be called.</p>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="FcgidBusyScanInterval" id="FcgidBusyScanInterval">FcgidBusyScanInterval</a> <a name="fcgidbusyscaninterval" id="fcgidbusyscaninterval">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>scan interval for busy timeout process</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>FcgidBusyScanInterval <em>seconds</em></code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>FcgidBusyScanInterval 120</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>External</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_fcgid</td></tr>
</table>
<p>The module performs the
<code class="directive"><a href="#fcgidbusytimeout">FcgidBusyTimeout</a></code> check at this
interval.</p>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="FcgidBusyTimeout" id="FcgidBusyTimeout">FcgidBusyTimeout</a> <a name="fcgidbusytimeout" id="fcgidbusytimeout">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>a FastCGI application will be killed after handling a request for FcgidBusyTimeout</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>FcgidBusyTimeout <em>seconds</em></code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>FcgidBusyTimeout 300</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>External</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_fcgid</td></tr>
</table>
<p>This is the maximum time limit for request handling. If a FastCGI
request does not complete within FcgidBusyTimeout seconds, it will be
subject to termination. Because the check is performed at the
interval defined by <code class="directive"><a href="#fcgidbusyscaninterval">FcgidBusyScanInterval</a></code>,
request handling may be allowed to proceed for a longer period of time.</p>
<p>The purpose of this directive is to terminate hung applications.
The default timeout may need to be increased for applications that
can take longer to process the request.</p>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="FcgidCmdOptions" id="FcgidCmdOptions">FcgidCmdOptions</a> <a name="fcgidcmdoptions" id="fcgidcmdoptions">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Set processing options for a FastCGI
command</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>FcgidCmdOptions <em>command</em> <em>option</em>
[<em>option</em>] ...</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>External</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_fcgid</td></tr>
</table>
<p>This directive allows processing options to be specified for
a specific command spawned by mod_fcgid. Each option for the
command corresponds to another directive that normally applies to
all commands started within a particular context. If a
particular option is not specified on this directive, the
default will be used.</p>
<p>The following table provides a list of options and
corresponding directives:</p>
<table class="bordered"><tr class="header"><th>Option name and syntax</th><th>Corresponding directive</th></tr>
<tr>
<td><code>ConnectTimeout <em>seconds</em></code></td>
<td><code class="directive"><a href="#fcgidconnecttimeout">FcgidConnectTimeout</a></code></td>
</tr>
<tr class="odd">
<td><code>IdleTimeout <em>seconds</em></code></td>
<td><code class="directive"><a href="#fcgididletimeout">FcgidIdleTimeout</a></code></td>
</tr>
<tr>
<td><code>InitialEnv <em>name[=value]</em></code></td>
<td><code class="directive"><a href="#fcgidinitialenv">FcgidInitialEnv</a></code></td>
</tr>
<tr class="odd">
<td><code>IOTimeout <em>seconds</em></code></td>
<td><code class="directive"><a href="#fcgidiotimeout">FcgidIOTimeout</a></code></td>
</tr>
<tr>
<td><code>MaxProcesses <em>value</em></code></td>
<td><code class="directive"><a href="#fcgidmaxprocessesperclass">FcgidMaxProcessesPerClass</a></code></td>
</tr>
<tr class="odd">
<td><code>MaxProcessLifeTime <em>seconds</em></code></td>
<td><code class="directive"><a href="#fcgidprocesslifetime">FcgidProcessLifeTime</a></code></td>
</tr>
<tr>
<td><code>MaxRequestsPerProcess <em>value</em></code></td>
<td><code class="directive"><a href="#fcgidmaxrequestsperprocess">FcgidMaxRequestsPerProcess</a></code></td>
</tr>
<tr class="odd">
<td><code>MinProcesses <em>value</em></code></td>
<td><code class="directive"><a href="#fcgidminprocessesperclass">FcgidMinProcessesPerClass</a></code></td>
</tr>
</table>
<p>Multiple environment variables are defined by repeating
the <code>InitialEnv</code> option.</p>
<div class="example"><h3>Example</h3><p><code>
FcgidCmdOptions /usr/local/bin/wrapper \<br />
<span class="indent">
InitialEnv MAX_REQUESTS=2000 \<br />
MaxRequestsPerProcess 2000 \<br />
IOTimeout 90<br />
</span>
</code></p></div>
<p>When <code>/usr/local/bin/wrapper</code> is spawned, its initial
environment contains the <code>MAX_REQUESTS=2000</code>
environment variable setting; additionally, mod_fcgid will
terminate it after it has handled 2000 requests, and I/O
operations will time out after 90 seconds. Directives
corresponding to other options, such as
<code class="directive"><a href="#fcgididletimeout">FcgidIdleTimeout</a></code> or
<code class="directive"><a href="#fcgidprocesslifetime">FcgidProcessLifeTime</a></code>,
will be ignored for this command; defaults will be used for options
not specified on <code class="directive">FcgidCmdOptions</code>.</p>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="FcgidConnectTimeout" id="FcgidConnectTimeout">FcgidConnectTimeout</a> <a name="fcgidconnecttimeout" id="fcgidconnecttimeout">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Connect timeout to FastCGI server</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>FcgidConnectTimeout <em>seconds</em></code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>FcgidConnectTimeout 3</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>External</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_fcgid</td></tr>
</table>
<p>This is the maximum period of time the module will wait
while trying to connect to a FastCGI application on Windows.
(This directive is not respected on Unix, where AF_UNIX defaults
will apply.)</p>
<p>This setting will apply to all applications spawned for this
server or virtual host. Use
<code class="directive"><a href="#fcgidcmdoptions">FcgidCmdOptions</a></code> to apply
this setting to a single application.</p>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="FcgidErrorScanInterval" id="FcgidErrorScanInterval">FcgidErrorScanInterval</a> <a name="fcgiderrorscaninterval" id="fcgiderrorscaninterval">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>scan interval for exited process</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>FcgidErrorScanInterval <em>seconds</em></code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>FcgidErrorScanInterval 3</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>External</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_fcgid</td></tr>
</table>
<p>This is the interval at which the module will handle
pending process termination. Termination is pending for
any processes which have exceeded
<code class="directive"><a href="#fcgididletimeout">FcgidIdleTimeout</a></code> or
<code class="directive"><a href="#fcgidprocesslifetime">FcgidProcessLifeTime</a></code>.</p>
<p>Unix: mod_fcgid will terminate such processes with SIGTERM;
if the process is still active during the next scan, the process
will be terminated with SIGKILL. Thus, this directive controls the
amount of time for orderly process terminate before being forcibly
killed.</p>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="FcgidFixPathinfo" id="FcgidFixPathinfo">FcgidFixPathinfo</a> <a name="fcgidfixpathinfo" id="fcgidfixpathinfo">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Mirror the PHP <code>cgi.fix_pathinfo</code>
setting</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>FcgidFixPathinfo 1</code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>FcgidFixPathinfo 0</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>External</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_fcgid</td></tr>
</table>
<p>This directive enables special <code>SCRIPT_NAME</code>
processing which allows PHP to provide additional path information.
The setting of <code class="directive">FcgidFixPathinfo</code>
should mirror the <code>cgi.fix_pathinfo</code> setting in
<code>php.ini</code>.</p>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="FcgidIdleScanInterval" id="FcgidIdleScanInterval">FcgidIdleScanInterval</a> <a name="fcgididlescaninterval" id="fcgididlescaninterval">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>scan interval for idle timeout process</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>FcgidIdleScanInterval <em>seconds</em></code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>FcgidIdleScanInterval 120</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>External</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_fcgid</td></tr>
</table>
<p>This is the interval at which the module will search for
processes which have exceeded
<code class="directive"><a href="#fcgididletimeout">FcgidIdleTimeout</a></code> or
<code class="directive"><a href="#fcgidprocesslifetime">FcgidProcessLifeTime</a></code>.</p>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="FcgidIdleTimeout" id="FcgidIdleTimeout">FcgidIdleTimeout</a> <a name="fcgididletimeout" id="fcgididletimeout">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>An idle FastCGI application will be killed after FcgidIdleTimeout</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>FcgidIdleTimeout <em>seconds</em></code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>FcgidIdleTimeout 300</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>External</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_fcgid</td></tr>
</table>
<p>Application processes which have not handled a request for this
period of time will be terminated, if the number of processses for the
class exceeds
<code class="directive"><a href="#fcgidminprocessesperclass">FcgidMinProcessesPerClass</a></code>.
A value of <code>0</code> disables the check.</p>
<p>This idle timeout check is performed at the frequency of the configured
<code class="directive"><a href="#fcgididlescaninterval">FcgidIdleScanInterval</a></code>.</p>
<p>This setting will apply to all applications spawned for this
server or virtual host. Use
<code class="directive"><a href="#fcgidcmdoptions">FcgidCmdOptions</a></code> to apply
this setting to a single application.</p>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="FcgidInitialEnv" id="FcgidInitialEnv">FcgidInitialEnv</a> <a name="fcgidinitialenv" id="fcgidinitialenv">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>an environment variable name and optional value to pass to FastCGI.</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>FcgidInitialEnv <em>name</em> [ <em>value</em> ]</code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>none</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>External</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_fcgid</td></tr>
</table>
<p>Use <code class="directive">FcgidInitialEnv</code> to define environment
variables to pass to the FastCGI application. This directive can
be used multiple times.</p>
<p>This setting will apply to all applications spawned for this
server or virtual host. Use
<code class="directive"><a href="#fcgidcmdoptions">FcgidCmdOptions</a></code> to apply
this setting to a single application.</p>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="FcgidIOTimeout" id="FcgidIOTimeout">FcgidIOTimeout</a> <a name="fcgidiotimeout" id="fcgidiotimeout">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Communication timeout to FastCGI server</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>FcgidIOTimeout <em>seconds</em></code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>FcgidIOTimeout 40</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>External</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_fcgid</td></tr>
</table>
<p>This is the maximum period of time the module will wait
while trying to read from or write to a FastCGI application.</p>
<div class="note"><h3>Note</h3>
<p>The FastCGI application must begin generating the response within
this period of time. Increase this directive as necessary to handle
applications which take a relatively long period of time to respond.</p>
</div>
<p>This setting will apply to all applications spawned for this
server or virtual host. Use
<code class="directive"><a href="#fcgidcmdoptions">FcgidCmdOptions</a></code> to apply
this setting to a single application.</p>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="FcgidIPCDir" id="FcgidIPCDir">FcgidIPCDir</a> <a name="fcgidipcdir" id="fcgidipcdir">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>directory for AF_UNIX sockets (Unix) or pipes (Windows)</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>FcgidIPCDir <em>pathname</em></code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>FcgidIPCDir logs/fcgidsock</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>External</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_fcgid</td></tr>
</table>
<p>This module uses AF_UNIX sockets or named pipes, depending on the
platform, to communicate with FastCGI applications. This directive
specifies the directory where those sockets or named pipes will be
created.</p>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="FcgidMaxProcesses" id="FcgidMaxProcesses">FcgidMaxProcesses</a> <a name="fcgidmaxprocesses" id="fcgidmaxprocesses">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>maximum number of FastCGI application processes</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>FcgidMaxProcesses <em>value</em></code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>FcgidMaxProcesses 1000</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>External</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_fcgid</td></tr>
</table>
<p>This directive sets the maximum number of FastCGI application
processes which can be active at one time.</p>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="FcgidMaxProcessesPerClass" id="FcgidMaxProcessesPerClass">FcgidMaxProcessesPerClass</a> <a name="fcgidmaxprocessesperclass" id="fcgidmaxprocessesperclass">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Max process count of one class of FastCGI application</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>FcgidMaxProcessesPerClass <em>value</em></code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>FcgidMaxProcessesPerClass 100</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>External</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_fcgid</td></tr>
</table>
<p>This directive sets the maximum number of processes that can be
started for each process class.</p>
<p>This setting will apply to all applications spawned for this
server or virtual host. Use
<code class="directive"><a href="#fcgidcmdoptions">FcgidCmdOptions</a></code> to apply
this setting to a single application.</p>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="FcgidMaxRequestInMem" id="FcgidMaxRequestInMem">FcgidMaxRequestInMem</a> <a name="fcgidmaxrequestinmem" id="fcgidmaxrequestinmem">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>maximum size of a request which will be held in memory</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>FcgidMaxRequestInMem <em>bytes</em></code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>FcgidMaxRequestInMem 65536</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>External</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_fcgid</td></tr>
</table>
<p>This module reads the entire request body from the client
before sending it to the application. Normally the request body
will be stored in memory. Once the amount of request body read
from the client exceeds <code class="directive">FcgidMaxRequestInMem</code>
bytes, the remainder of the request body will be stored in a
temporary file.</p>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="FcgidMaxRequestLen" id="FcgidMaxRequestLen">FcgidMaxRequestLen</a> <a name="fcgidmaxrequestlen" id="fcgidmaxrequestlen">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>maximum HTTP request length</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>FcgidMaxRequestLen <em>bytes</em></code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>FcgidMaxRequestLen 131072</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>External</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_fcgid</td></tr>
</table>
<p>If the size of the request body exceeds this amount, the
request will fail with <code>500 Server Error</code>.</p>
<p>Administrators should change this to an appropriate value for their site based
on application requirements.</p>
<div class="warning"><h3>Warning</h3>
<p>Before 2.3.6, this defaulted to 1GB. Most users of earlier versions should
use this directive to set a more reasonable limit.</p>
</div>
<h3>See also</h3>
<ul>
<li><code class="directive"><a href="#fcgidmaxrequestinmem">FcgidMaxRequestInMem</a></code></li>
</ul>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="FcgidMaxRequestsPerProcess" id="FcgidMaxRequestsPerProcess">FcgidMaxRequestsPerProcess</a> <a name="fcgidmaxrequestsperprocess" id="fcgidmaxrequestsperprocess">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Max requests handled by each FastCGI application</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>FcgidMaxRequestsPerProcess <em>value</em></code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>FcgidMaxRequestsPerProcess 0</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>External</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_fcgid</td></tr>
</table>
<p>FastCGI application processes will be terminated after handling
the specified number of requests. A value of <code>0</code>
disables the check.</p>
<div class="note"><h3>Note</h3>
<p>A value of <code>-1</code> is currently accepted for ease of
migration for existing configurations. It is treated the same as
<code>0</code>.</p>
</div>
<p>Certain applications, notably PHP as FastCGI, have their own
facility for terminating after handling a certain number of
requests. This directive can be used to avoid sending
additional requests to the application after it has handled its
limit.</p>
<div class="note"><h3>Note</h3>
<p>If this is set such that frequent process creation will be
required, you will likely need to adjust
<code class="directive"><a href="#fcgidspawnscoreuplimit">FcgidSpawnScoreUpLimit</a></code>
or other score-related directives to allow more frequent process
creation.</p>
</div>
<p>This setting will apply to all applications spawned for this
server or virtual host. Use
<code class="directive"><a href="#fcgidcmdoptions">FcgidCmdOptions</a></code> to apply
this setting to a single application.</p>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="FcgidMinProcessesPerClass" id="FcgidMinProcessesPerClass">FcgidMinProcessesPerClass</a> <a name="fcgidminprocessesperclass" id="fcgidminprocessesperclass">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Min process count of one class of FastCGI application</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>FcgidMinProcessesPerClass <em>value</em></code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>FcgidMinProcessesPerClass 3</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>External</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_fcgid</td></tr>
</table>
<p>This directive sets the minimum number of processes that will be
retained in a process class after finishing requests.</p>
<p>This setting will apply to all applications spawned for this
server or virtual host. Use
<code class="directive"><a href="#fcgidcmdoptions">FcgidCmdOptions</a></code> to apply
this setting to a single application.</p>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="FcgidOutputBufferSize" id="FcgidOutputBufferSize">FcgidOutputBufferSize</a> <a name="fcgidoutputbuffersize" id="fcgidoutputbuffersize">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>CGI output buffer size</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>FcgidOutputBufferSize <em>bytes</em></code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>FcgidOutputBufferSize 65536</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>External</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_fcgid</td></tr>
</table>
<p>This is the maximum amount of response data the module will read
from the FastCGI application before flushing the data to the client.</p>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="FcgidPassHeader" id="FcgidPassHeader">FcgidPassHeader</a> <a name="fcgidpassheader" id="fcgidpassheader">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Header name which will be passed to FastCGI as environment variable.</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>FcgidPassHeader <em>name</em></code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>none</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>External</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_fcgid</td></tr>
</table>
<p>This directive specifies the name of a request header which
will be passed to the FastCGI application as an environment
variable. The name of the environment variable is derived from
the value specified on this directive, as discussed below:</p>
<p>The legacy behavior is to use the value specified on this directive
as the environment variable name, converting hyphens to underscores.
No case conversion is performed.</p>
<p>Beginning with release 2.3.6, an additional environment variable
is created. The value specified on this directive is converted to
upper case, prefixed with <code>HTTP_</code>, and hyphens are
converted to underscores.</p>
<div class="note"><h3>Note</h3>
<p>Most request headers are already available to the application
as environment variables, and generally are prefixed with
<code>HTTP_</code>. (Notable exceptions are <code>Content-type</code>
and <code>Content-length</code>, which do not have the
<code>HTTP_</code> prefix.) Thus, this directive is only required
for request headers that are purposefully omitted, such as
<code>Authorization</code> and <code>Proxy-Authorization</code>.
Only pass these request headers if absolutely required.</p>
</div>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="FcgidProcessLifeTime" id="FcgidProcessLifeTime">FcgidProcessLifeTime</a> <a name="fcgidprocesslifetime" id="fcgidprocesslifetime">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>maximum FastCGI application process lifetime</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>FcgidProcessLifeTime <em>seconds</em></code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>FcgidProcessLifeTime 3600</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>External</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_fcgid</td></tr>
</table>
<p>Idle application processes which have existed for greater
than this time will be terminated, if the number of processses for the
class exceeds
<code class="directive"><a href="#fcgidminprocessesperclass">FcgidMinProcessesPerClass</a></code>.
A value of <code>0</code> disables the check.</p>
<p>This process lifetime check is performed at the frequency of the configured
<code class="directive"><a href="#fcgididlescaninterval">FcgidIdleScanInterval</a></code>.</p>
<p>This setting will apply to all applications spawned for this
server or virtual host. Use
<code class="directive"><a href="#fcgidcmdoptions">FcgidCmdOptions</a></code> to apply
this setting to a single application.</p>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="FcgidProcessTableFile" id="FcgidProcessTableFile">FcgidProcessTableFile</a> <a name="fcgidprocesstablefile" id="fcgidprocesstablefile">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>shared memory file path</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>FcgidProcessTableFile <em>pathname</em></code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>FcgidProcessTableFile logs/fcgid_shm</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>External</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_fcgid</td></tr>
</table>
<p>This module uses shared memory on Unix to maintain state which
is shared between httpd processes. This directive specifies the
name of the shared memory file.</p>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="FcgidSpawnScore" id="FcgidSpawnScore">FcgidSpawnScore</a> <a name="fcgidspawnscore" id="fcgidspawnscore">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Each spawn adds this value to the process activity score.</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>FcgidSpawnScore <em>value</em></code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>FcgidSpawnScore 1</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>External</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_fcgid</td></tr>
</table>
<p>Lower values of this directive increase the allowed spawn rate.</p>
<p>Refer to the <code class="directive"><a href="#fcgidspawnscoreuplimit">FcgidSpawnScoreUpLimit</a></code>
directive for more information.</p>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="FcgidSpawnScoreUpLimit" id="FcgidSpawnScoreUpLimit">FcgidSpawnScoreUpLimit</a> <a name="fcgidspawnscoreuplimit" id="fcgidspawnscoreuplimit">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Maximum value of the process activity score which allows
a spawn to occur</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>FcgidSpawnScoreUpLimit <em>value</em></code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>FcgidSpawnScoreUpLimit 10</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>External</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_fcgid</td></tr>
</table>
<p>A process activity score is maintained for each FastCGI application;
the score is used to control the rate of spawning in order to avoid
placing too much load on the system, particularly for applications that
are repeatedly exiting abnormally.</p>
<p>The value of <code class="directive"><a href="#fcgidspawnscore">FcgidSpawnScore</a></code>
is added to the score for every spawned application process. The value of
<code class="directive"><a href="#fcgidterminationscore">FcgidTerminationScore</a></code> is added
to the score for every terminated application process. The value of
<code class="directive"><a href="#fcgidtimescore">FcgidTimeScore</a></code> is subtracted
from the score every second.</p>
<p>When the current score is higher than the value of
<code class="directive">FcgidSpawnScoreUpLimit</code>, no additional application
processes will be spawned; subsequent requests must wait until an existing
process is free or until the score decreases below the limit.</p>
<p>If the limit is reached under normal load, it may not be sufficient to
simply increase the limit, as that would only delay the amount of time
before the limit is reached again. Decrease the value of
<code class="directive"><a href="#fcgidspawnscore">FcgidSpawnScore</a></code> and/or
<code class="directive"><a href="#fcgidterminationscore">FcgidTerminationScore</a></code>, or
increase the value of <code class="directive"><a href="#fcgidtimescore">FcgidTimeScore</a></code>,
to allow a higher rate of spawning.</p>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="FcgidTerminationScore" id="FcgidTerminationScore">FcgidTerminationScore</a> <a name="fcgidterminationscore" id="fcgidterminationscore">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Each terminated process adds this value to the process activity
score.</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>FcgidTerminationScore <em>value</em></code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>FcgidTerminationScore 2</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>External</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_fcgid</td></tr>
</table>
<p>Lower values of this directive increase the allowed spawn rate. Negative
values can be useful in some circumstances, such as allowing process
replacement without increasing the score.</p>
<p>Refer to the <code class="directive"><a href="#fcgidspawnscoreuplimit">FcgidSpawnScoreUpLimit</a></code>
directive for more information.</p>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="FcgidTimeScore" id="FcgidTimeScore">FcgidTimeScore</a> <a name="fcgidtimescore" id="fcgidtimescore">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Amount subtracted from process activity score each
second</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>FcgidTimeScore <em>value</em></code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>FcgidTimeScore 1</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>External</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_fcgid</td></tr>
</table>
<p>Higher values of this directive increase the allowed spawn rate.</p>
<p>Refer to the <code class="directive"><a href="#fcgidspawnscoreuplimit">FcgidSpawnScoreUpLimit</a></code>
directive for more information.</p>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="FcgidWin32PreventOrphans" id="FcgidWin32PreventOrphans">FcgidWin32PreventOrphans</a> <a name="fcgidwin32preventorphans" id="fcgidwin32preventorphans">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Job Control orphan prevention for fcgi workers.</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>FcgidWin32PreventOrphans <em>On|Off</em></code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>FcgidWin32PreventOrphans Off</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>External</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_fcgid</td></tr>
</table>
<p>Uses Job Control Objects on Windows, only, to enforce shutdown of all
fcgi processes created by the httpd worker when the httpd worker has been
terminated. Processes terminated in this way do not have the opportunity
to clean up gracefully, complete pending disk writes, or similar closure
transactions, therefore this behavior is experimental and disabled, by
default.</p>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="FcgidWrapper" id="FcgidWrapper">FcgidWrapper</a> <a name="fcgidwrapper" id="fcgidwrapper">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>The CGI wrapper setting</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>FcgidWrapper <em>command</em> [ <em>suffix</em> ] [ virtual ]</code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>none</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>External</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_fcgid</td></tr>
</table>
<p>The given command is used to spawn FCGI server processes. If this directive
is not used, the file pointed to by the request URL will be used instead.
Options for the command can be included using quotation marks surrounding
the command and options.</p>
<p>The optional <code>suffix</code> argument restricts the use of this FCGI
server to all URLs with the given exact path suffix. A suffix needs to start
with '<code>.</code>'.</p>
<p>The <code>virtual</code> flag signals that there will be no check
whether the request URL actually points to an existing file. The only
file which needs to exist is the wrapper itself.</p>
<p>The directive can be used multiple times. A wrapper defined without a suffix
is used as a default in case no suffix matches.</p>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="FcgidZombieScanInterval" id="FcgidZombieScanInterval">FcgidZombieScanInterval</a> <a name="fcgidzombiescaninterval" id="fcgidzombiescaninterval">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>scan interval for zombie process</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>FcgidZombieScanInterval <em>seconds</em></code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>FcgidZombieScanInterval 3</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>External</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_fcgid</td></tr>
</table>
<p>The module checks for exited FastCGI applications at this interval.
During this period of time, the application may exist in the process
table as a zombie (on Unix).</p>
</div>
</div>
<div class="bottomlang">
<p><span>Available Languages: </span><a href="../en/mod/mod_fcgid.html" title="English"> en </a></p>
</div><div id="footer">
<p class="apache">Copyright 2012 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
<p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p></div>
</body></html>
|