core.html.en 270 KB
Newer Older
powelld's avatar
powelld committed
3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000
    messages recorded in the error logs (see <code class="directive"><a href="#errorlog">ErrorLog</a></code> directive). The following
    <var>level</var>s are available, in order of decreasing
    significance:</p>

    <table class="bordered">
    
      <tr>
        <th><strong>Level</strong> </th>

        <th><strong>Description</strong> </th>

        <th><strong>Example</strong> </th>
      </tr>

      <tr>
        <td><code>emerg</code> </td>

        <td>Emergencies - system is unusable.</td>

        <td>"Child cannot open lock file. Exiting"</td>
      </tr>

      <tr>
        <td><code>alert</code> </td>

        <td>Action must be taken immediately.</td>

        <td>"getpwuid: couldn't determine user name from uid"</td>
      </tr>

      <tr>
        <td><code>crit</code> </td>

        <td>Critical Conditions.</td>

        <td>"socket: Failed to get a socket, exiting child"</td>
      </tr>

      <tr>
        <td><code>error</code> </td>

        <td>Error conditions.</td>

        <td>"Premature end of script headers"</td>
      </tr>

      <tr>
        <td><code>warn</code> </td>

        <td>Warning conditions.</td>

        <td>"child process 1234 did not exit, sending another
        SIGHUP"</td>
      </tr>

      <tr>
        <td><code>notice</code> </td>

        <td>Normal but significant condition.</td>

        <td>"httpd: caught SIGBUS, attempting to dump core in
        ..."</td>
      </tr>

      <tr>
        <td><code>info</code> </td>

        <td>Informational.</td>

        <td>"Server seems busy, (you may need to increase
        StartServers, or Min/MaxSpareServers)..."</td>
      </tr>

      <tr>
        <td><code>debug</code> </td>

        <td>Debug-level messages</td>

        <td>"Opening config file ..."</td>
      </tr>
      <tr>
        <td><code>trace1</code> </td>

        <td>Trace messages</td>

        <td>"proxy: FTP: control connection complete"</td>
      </tr>
      <tr>
        <td><code>trace2</code> </td>

        <td>Trace messages</td>

        <td>"proxy: CONNECT: sending the CONNECT request to the remote proxy"</td>
      </tr>
      <tr>
        <td><code>trace3</code> </td>

        <td>Trace messages</td>

        <td>"openssl: Handshake: start"</td>
      </tr>
      <tr>
        <td><code>trace4</code> </td>

        <td>Trace messages</td>

        <td>"read from buffered SSL brigade, mode 0, 17 bytes"</td>
      </tr>
      <tr>
        <td><code>trace5</code> </td>

        <td>Trace messages</td>

        <td>"map lookup FAILED: map=rewritemap key=keyname"</td>
      </tr>
      <tr>
        <td><code>trace6</code> </td>

        <td>Trace messages</td>

        <td>"cache lookup FAILED, forcing new map lookup"</td>
      </tr>
      <tr>
        <td><code>trace7</code> </td>

        <td>Trace messages, dumping large amounts of data</td>

        <td>"| 0000: 02 23 44 30 13 40 ac 34 df 3d bf 9a 19 49 39 15 |"</td>
      </tr>
      <tr>
        <td><code>trace8</code> </td>

        <td>Trace messages, dumping large amounts of data</td>

        <td>"| 0000: 02 23 44 30 13 40 ac 34 df 3d bf 9a 19 49 39 15 |"</td>
      </tr>
    </table>

    <p>When a particular level is specified, messages from all
    other levels of higher significance will be reported as well.
    <em>E.g.</em>, when <code>LogLevel info</code> is specified,
    then messages with log levels of <code>notice</code> and
    <code>warn</code> will also be posted.</p>

    <p>Using a level of at least <code>crit</code> is
    recommended.</p>

    <p>For example:</p>

    <pre class="prettyprint lang-config">LogLevel notice</pre>


    <div class="note"><h3>Note</h3>
      <p>When logging to a regular file, messages of the level
      <code>notice</code> cannot be suppressed and thus are always
      logged. However, this doesn't apply when logging is done
      using <code>syslog</code>.</p>
    </div>

    <p>Specifying a level without a module name will reset the level
    for all modules to that level.  Specifying a level with a module
    name will set the level for that module only. It is possible to
    use the module source file name, the module identifier, or the
    module identifier with the trailing <code>_module</code> omitted
    as module specification. This means the following three specifications
    are equivalent:</p>

    <pre class="prettyprint lang-config">LogLevel info ssl:warn
LogLevel info mod_ssl.c:warn
LogLevel info ssl_module:warn</pre>


    <p>It is also possible to change the level per directory:</p>

    <pre class="prettyprint lang-config">LogLevel info
&lt;Directory "/usr/local/apache/htdocs/app"&gt;
  LogLevel debug
&lt;/Directory&gt;</pre>


    <div class="note">
        Per directory loglevel configuration only affects messages that are
        logged after the request has been parsed and that are associated with
        the request. Log messages which are associated with the connection or
        the server are not affected.
    </div>

<h3>See also</h3>
<ul>
<li><code class="directive"><a href="#errorlog">ErrorLog</a></code></li>
<li><code class="directive"><a href="#errorlogformat">ErrorLogFormat</a></code></li>
<li><a href="../logs.html">Apache HTTP Server Log Files</a></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="MaxKeepAliveRequests" id="MaxKeepAliveRequests">MaxKeepAliveRequests</a> <a name="maxkeepaliverequests" id="maxkeepaliverequests">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Number of requests allowed on a persistent
connection</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>MaxKeepAliveRequests <var>number</var></code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>MaxKeepAliveRequests 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>Core</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
</table>
    <p>The <code class="directive">MaxKeepAliveRequests</code> directive
    limits the number of requests allowed per connection when
    <code class="directive"><a href="#keepalive">KeepAlive</a></code> is on. If it is
    set to <code>0</code>, unlimited requests will be allowed. We
    recommend that this setting be kept to a high value for maximum
    server performance.</p>

    <p>For example:</p>

    <pre class="prettyprint lang-config">MaxKeepAliveRequests 500</pre>


</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="MaxRangeOverlaps" id="MaxRangeOverlaps">MaxRangeOverlaps</a> <a name="maxrangeoverlaps" id="maxrangeoverlaps">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Number of overlapping ranges (eg: <code>100-200,150-300</code>) allowed before returning the complete
        resource </td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>MaxRangeOverlaps default | unlimited | none | <var>number-of-ranges</var></code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>MaxRangeOverlaps 20</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory</td></tr>
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache HTTP Server 2.3.15 and later</td></tr>
</table>
        <p>The <code class="directive">MaxRangeOverlaps</code> directive
            limits the number of overlapping HTTP ranges the server is willing to
            return to the client. If more overlapping ranges than permitted are requested,
            the complete resource is returned instead.</p>

        <dl>
            <dt><strong>default</strong></dt>
            <dd>Limits the number of overlapping ranges to a compile-time default of 20.</dd>

            <dt><strong>none</strong></dt>
            <dd>No overlapping Range headers are allowed.</dd>

            <dt><strong>unlimited</strong></dt>
            <dd>The server does not limit the number of overlapping ranges it is
                willing to satisfy.</dd>

            <dt><var>number-of-ranges</var></dt>
            <dd>A positive number representing the maximum number of overlapping ranges the
                server is willing to satisfy.</dd>
        </dl>
    
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="MaxRangeReversals" id="MaxRangeReversals">MaxRangeReversals</a> <a name="maxrangereversals" id="maxrangereversals">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Number of range reversals (eg: <code>100-200,50-70</code>) allowed before returning the complete
        resource </td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>MaxRangeReversals default | unlimited | none | <var>number-of-ranges</var></code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>MaxRangeReversals 20</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory</td></tr>
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache HTTP Server 2.3.15 and later</td></tr>
</table>
        <p>The <code class="directive">MaxRangeReversals</code> directive
            limits the number of HTTP Range reversals the server is willing to
            return to the client. If more ranges reversals than permitted are requested,
            the complete resource is returned instead.</p>

        <dl>
            <dt><strong>default</strong></dt>
            <dd>Limits the number of range reversals to a compile-time default of 20.</dd>

            <dt><strong>none</strong></dt>
            <dd>No Range reversals headers are allowed.</dd>

            <dt><strong>unlimited</strong></dt>
            <dd>The server does not limit the number of range reversals it is
                willing to satisfy.</dd>

            <dt><var>number-of-ranges</var></dt>
            <dd>A positive number representing the maximum number of range reversals the
                server is willing to satisfy.</dd>
        </dl>
    
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="MaxRanges" id="MaxRanges">MaxRanges</a> <a name="maxranges" id="maxranges">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Number of ranges allowed before returning the complete
resource </td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>MaxRanges default | unlimited | none | <var>number-of-ranges</var></code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>MaxRanges 200</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory</td></tr>
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache HTTP Server 2.3.15 and later</td></tr>
</table>
    <p>The <code class="directive">MaxRanges</code> directive
    limits the number of HTTP ranges the server is willing to
    return to the client. If more ranges than permitted are requested,
    the complete resource is returned instead.</p>

    <dl>
      <dt><strong>default</strong></dt>
      <dd>Limits the number of ranges to a compile-time default of 200.</dd>

      <dt><strong>none</strong></dt>
      <dd>Range headers are ignored.</dd>

      <dt><strong>unlimited</strong></dt>
      <dd>The server does not limit the number of ranges it is
          willing to satisfy.</dd>

      <dt><var>number-of-ranges</var></dt>
      <dd>A positive number representing the maximum number of ranges the
      server is willing to satisfy.</dd>
    </dl>

</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="MergeTrailers" id="MergeTrailers">MergeTrailers</a> <a name="mergetrailers" id="mergetrailers">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Determines whether trailers are merged into headers</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>MergeTrailers [on|off]</code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>MergeTrailers off</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>Core</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>2.4.11 and later</td></tr>
</table>
    <p>This directive controls whether HTTP trailers are copied into the
    internal representation of HTTP headers. This merging occurs when the
    request body has been completely consumed, long after most header
    processing would have a chance to examine or modify request headers.</p>
    <p>This option is provided for compatibility with releases prior to 2.4.11,
    where trailers were always merged.</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="Mutex" id="Mutex">Mutex</a> <a name="mutex" id="mutex">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Configures mutex mechanism and lock file directory for all
or specified mutexes</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>Mutex <var>mechanism</var> [default|<var>mutex-name</var>] ... [OmitPID]</code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>Mutex default</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>Core</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache HTTP Server 2.3.4 and later</td></tr>
</table>
    <p>The <code class="directive">Mutex</code> directive sets the mechanism,
    and optionally the lock file location, that httpd and modules use
    to serialize access to resources.  Specify <code>default</code> as
    the second argument to change the settings for all mutexes; specify
    a mutex name (see table below) as the second argument to override
    defaults only for that mutex.</p>

    <p>The <code class="directive">Mutex</code> directive is typically used in
    the following exceptional situations:</p>

    <ul>
        <li>change the mutex mechanism when the default mechanism selected
        by <a class="glossarylink" href="../glossary.html#apr" title="see glossary">APR</a> has a functional or performance
        problem</li>

        <li>change the directory used by file-based mutexes when the
        default directory does not support locking</li>
    </ul>

    <div class="note"><h3>Supported modules</h3>
    <p>This directive only configures mutexes which have been registered
    with the core server using the <code>ap_mutex_register()</code> API.
    All modules bundled with httpd support the <code class="directive">Mutex</code>
    directive, but third-party modules may not.  Consult the documentation
    of the third-party module, which must indicate the mutex name(s) which
    can be configured if this directive is supported.</p>
    </div>

    <p>The following mutex <em>mechanisms</em> are available:</p>
    <ul>
        <li><code>default | yes</code>
        <p>This selects the default locking implementation, as determined by
        <a class="glossarylink" href="../glossary.html#apr" title="see glossary">APR</a>.  The default locking implementation can
        be displayed by running <code class="program"><a href="../programs/httpd.html">httpd</a></code> with the
        <code>-V</code> option.</p></li>

        <li><code>none | no</code>
        <p>This effectively disables the mutex, and is only allowed for a
        mutex if the module indicates that it is a valid choice.  Consult the
        module documentation for more information.</p></li>

        <li><code>posixsem</code>
        <p>This is a mutex variant based on a Posix semaphore.</p>

        <div class="warning"><h3>Warning</h3>
        <p>The semaphore ownership is not recovered if a thread in the process
        holding the mutex segfaults, resulting in a hang of the web server.</p>
        </div>
        </li>

        <li><code>sysvsem</code>
        <p>This is a mutex variant based on a SystemV IPC semaphore.</p>

        <div class="warning"><h3>Warning</h3>
        <p>It is possible to "leak" SysV semaphores if processes crash
        before the semaphore is removed.</p>
	</div>

        <div class="warning"><h3>Security</h3>
        <p>The semaphore API allows for a denial of service attack by any
        CGIs running under the same uid as the webserver (<em>i.e.</em>,
        all CGIs, unless you use something like <code class="program"><a href="../programs/suexec.html">suexec</a></code>
        or <code>cgiwrapper</code>).</p>
	</div>
        </li>

        <li><code>sem</code>
        <p>This selects the "best" available semaphore implementation, choosing
        between Posix and SystemV IPC semaphores, in that order.</p></li>

        <li><code>pthread</code>
        <p>This is a mutex variant based on cross-process Posix thread
        mutexes.</p>

        <div class="warning"><h3>Warning</h3>
        <p>On most systems, if a child process terminates abnormally while
        holding a mutex that uses this implementation, the server will deadlock
        and stop responding to requests.  When this occurs, the server will
        require a manual restart to recover.</p>
        <p>Solaris and Linux are notable exceptions as they provide a mechanism which
        usually allows the mutex to be recovered after a child process
        terminates abnormally while holding a mutex.</p>
        <p>If your system is POSIX compliant or if it implements the
        <code>pthread_mutexattr_setrobust_np()</code> function, you may be able
        to use the <code>pthread</code> option safely.</p>
        </div>
        </li>

        <li><code>fcntl:/path/to/mutex</code>
        <p>This is a mutex variant where a physical (lock-)file and the
        <code>fcntl()</code> function are used as the mutex.</p>

        <div class="warning"><h3>Warning</h3>
        <p>When multiple mutexes based on this mechanism are used within
        multi-threaded, multi-process environments, deadlock errors (EDEADLK)
        can be reported for valid mutex operations if <code>fcntl()</code>
        is not thread-aware, such as on Solaris.</p>
	</div>
        </li>

        <li><code>flock:/path/to/mutex</code>
        <p>This is similar to the <code>fcntl:/path/to/mutex</code> method
        with the exception that the <code>flock()</code> function is used to
        provide file locking.</p></li>

        <li><code>file:/path/to/mutex</code>
        <p>This selects the "best" available file locking implementation,
        choosing between <code>fcntl</code> and <code>flock</code>, in that
        order.</p></li>
    </ul>

    <p>Most mechanisms are only available on selected platforms, where the
    underlying platform and <a class="glossarylink" href="../glossary.html#apr" title="see glossary">APR</a> support it.  Mechanisms
    which aren't available on all platforms are <em>posixsem</em>,
    <em>sysvsem</em>, <em>sem</em>, <em>pthread</em>, <em>fcntl</em>,
    <em>flock</em>, and <em>file</em>.</p>

    <p>With the file-based mechanisms <em>fcntl</em> and <em>flock</em>,
    the path, if provided, is a directory where the lock file will be created.
    The default directory is httpd's run-time file directory relative to
    <code class="directive"><a href="#serverroot">ServerRoot</a></code>.  Always use a local disk
    filesystem for <code>/path/to/mutex</code> and never a directory residing
    on a NFS- or AFS-filesystem.  The basename of the file will be the mutex
    type, an optional instance string provided by the module, and unless the
    <code>OmitPID</code> keyword is specified, the process id of the httpd
    parent process will be appended to make the file name unique, avoiding
    conflicts when multiple httpd instances share a lock file directory.  For
    example, if the mutex name is <code>mpm-accept</code> and the lock file
    directory is <code>/var/httpd/locks</code>, the lock file name for the
    httpd instance with parent process id 12345 would be
    <code>/var/httpd/locks/mpm-accept.12345</code>.</p>

    <div class="warning"><h3>Security</h3>
    <p>It is best to <em>avoid</em> putting mutex files in a world-writable
    directory such as <code>/var/tmp</code> because someone could create
    a denial of service attack and prevent the server from starting by
    creating a lockfile with the same name as the one the server will try
    to create.</p>
    </div>

    <p>The following table documents the names of mutexes used by httpd
    and bundled modules.</p>

    <table class="bordered"><tr class="header">
            <th>Mutex name</th>
            <th>Module(s)</th>
            <th>Protected resource</th>
	</tr>
<tr>
            <td><code>mpm-accept</code></td>
            <td><code class="module"><a href="../mod/prefork.html">prefork</a></code> and <code class="module"><a href="../mod/worker.html">worker</a></code> MPMs</td>
            <td>incoming connections, to avoid the thundering herd problem;
            for more information, refer to the
            <a href="../misc/perf-tuning.html">performance tuning</a>
            documentation</td>
	</tr>
<tr class="odd">
            <td><code>authdigest-client</code></td>
            <td><code class="module"><a href="../mod/mod_auth_digest.html">mod_auth_digest</a></code></td>
            <td>client list in shared memory</td>
	</tr>
<tr>
            <td><code>authdigest-opaque</code></td>
            <td><code class="module"><a href="../mod/mod_auth_digest.html">mod_auth_digest</a></code></td>
            <td>counter in shared memory</td>
	</tr>
<tr class="odd">
            <td><code>ldap-cache</code></td>
            <td><code class="module"><a href="../mod/mod_ldap.html">mod_ldap</a></code></td>
            <td>LDAP result cache</td>
	</tr>
<tr>
            <td><code>rewrite-map</code></td>
            <td><code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code></td>
            <td>communication with external mapping programs, to avoid
            intermixed I/O from multiple requests</td>
	</tr>
<tr class="odd">
            <td><code>ssl-cache</code></td>
            <td><code class="module"><a href="../mod/mod_ssl.html">mod_ssl</a></code></td>
            <td>SSL session cache</td>
	</tr>
<tr>
            <td><code>ssl-stapling</code></td>
            <td><code class="module"><a href="../mod/mod_ssl.html">mod_ssl</a></code></td>
            <td>OCSP stapling response cache</td>
	</tr>
<tr class="odd">
            <td><code>watchdog-callback</code></td>
            <td><code class="module"><a href="../mod/mod_watchdog.html">mod_watchdog</a></code></td>
            <td>callback function of a particular client module</td>
	</tr>
</table>

    <p>The <code>OmitPID</code> keyword suppresses the addition of the httpd
    parent process id from the lock file name.</p>

    <p>In the following example, the mutex mechanism for the MPM accept
    mutex will be changed from the compiled-in default to <code>fcntl</code>,
    with the associated lock file created in directory
    <code>/var/httpd/locks</code>.  The mutex mechanism for all other mutexes
    will be changed from the compiled-in default to <code>sysvsem</code>.</p>

    <pre class="prettyprint lang-config">Mutex sysvsem default
Mutex fcntl:/var/httpd/locks mpm-accept</pre>


</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="NameVirtualHost" id="NameVirtualHost">NameVirtualHost</a> <a name="namevirtualhost" id="namevirtualhost">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>DEPRECATED: Designates an IP address for name-virtual
hosting</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>NameVirtualHost <var>addr</var>[:<var>port</var>]</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>Core</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
</table>

<p>Prior to 2.3.11, <code class="directive">NameVirtualHost</code> was required
to instruct the server that a particular IP address and port combination
was usable as a name-based virtual host.  In 2.3.11 and later,
any time an IP address and port combination is used in multiple virtual
hosts, name-based virtual hosting is automatically enabled for that address.</p>

<p>This directive currently has no effect.</p>

<h3>See also</h3>
<ul>
<li><a href="../vhosts/">Virtual Hosts
documentation</a></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="Options" id="Options">Options</a> <a name="options" id="options">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Configures what features are available in a particular
directory</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>Options
    [+|-]<var>option</var> [[+|-]<var>option</var>] ...</code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>Options FollowSymlinks</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>Options</td></tr>
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>The default was changed from All to FollowSymlinks in 2.3.11</td></tr>
</table>
    <p>The <code class="directive">Options</code> directive controls which
    server features are available in a particular directory.</p>

    <p><var>option</var> can be set to <code>None</code>, in which
    case none of the extra features are enabled, or one or more of
    the following:</p>

    <dl>
      <dt><code>All</code></dt>

      <dd>All options except for <code>MultiViews</code>.</dd>

      <dt><code>ExecCGI</code></dt>

      <dd>
      Execution of CGI scripts using <code class="module"><a href="../mod/mod_cgi.html">mod_cgi</a></code>
      is permitted.</dd>

      <dt><code>FollowSymLinks</code></dt>

      <dd>
      The server will follow symbolic links in this directory. This is
      the default setting.
      <div class="note">
      <p>Even though the server follows the symlink it does <em>not</em>
      change the pathname used to match against <code class="directive"><a href="#directory">&lt;Directory&gt;</a></code> sections.</p>

      <p>The <code>FollowSymLinks</code> and
      <code>SymLinksIfOwnerMatch</code> <code class="directive"><a href="#options">Options</a></code> work only in <code class="directive"><a href="#directory">&lt;Directory&gt;</a></code> sections or
      <code>.htaccess</code> files.</p>

      <p>Omitting this option should not be considered a security restriction,
      since symlink testing is subject to race conditions that make it
      circumventable.</p>
      </div></dd>

      <dt><code>Includes</code></dt>

      <dd>
      Server-side includes provided by <code class="module"><a href="../mod/mod_include.html">mod_include</a></code>
      are permitted.</dd>

      <dt><code>IncludesNOEXEC</code></dt>

      <dd>

      Server-side includes are permitted, but the <code>#exec
      cmd</code> and <code>#exec cgi</code> are disabled. It is still
      possible to <code>#include virtual</code> CGI scripts from
      <code class="directive"><a href="../mod/mod_alias.html#scriptalias">ScriptAlias</a></code>ed
      directories.</dd>

      <dt><code>Indexes</code></dt>

      <dd>
      If a URL which maps to a directory is requested and there
      is no <code class="directive"><a href="../mod/mod_dir.html#directoryindex">DirectoryIndex</a></code>
      (<em>e.g.</em>, <code>index.html</code>) in that directory, then
      <code class="module"><a href="../mod/mod_autoindex.html">mod_autoindex</a></code> will return a formatted listing
      of the directory.</dd>

      <dt><code>MultiViews</code></dt>

      <dd>
      <a href="../content-negotiation.html">Content negotiated</a>
      "MultiViews" are allowed using
      <code class="module"><a href="../mod/mod_negotiation.html">mod_negotiation</a></code>.
      <div class="note"><h3>Note</h3> <p>This option gets ignored if set
      anywhere other than <code class="directive"><a href="#directory">&lt;Directory&gt;</a></code>, as <code class="module"><a href="../mod/mod_negotiation.html">mod_negotiation</a></code>
      needs real resources to compare against and evaluate from.</p></div>
      </dd>

      <dt><code>SymLinksIfOwnerMatch</code></dt>

      <dd>The server will only follow symbolic links for which the
      target file or directory is owned by the same user id as the
      link.

      <div class="note"><h3>Note</h3>
      <p>The <code>FollowSymLinks</code> and
      <code>SymLinksIfOwnerMatch</code> <code class="directive"><a href="#options">Options</a></code> work only in <code class="directive"><a href="#directory">&lt;Directory&gt;</a></code> sections or
      <code>.htaccess</code> files.</p>

      <p>This option should not be considered a security restriction,
      since symlink testing is subject to race conditions that make it
      circumventable.</p>
      </div> </dd>
    </dl>

    <p>Normally, if multiple <code class="directive">Options</code> could
    apply to a directory, then the most specific one is used and
    others are ignored; the options are not merged. (See <a href="../sections.html#merging">how sections are merged</a>.)
    However if <em>all</em> the options on the
    <code class="directive">Options</code> directive are preceded by a
    <code>+</code> or <code>-</code> symbol, the options are
    merged. Any options preceded by a <code>+</code> are added to the
    options currently in force, and any options preceded by a
    <code>-</code> are removed from the options currently in
    force. </p>

    <div class="note"><h3>Note</h3>
    <p>Mixing <code class="directive">Options</code> with a <code>+</code> or
    <code>-</code> with those without is not valid syntax and will be
    rejected during server startup by the syntax check with an abort.</p>
    </div>

    <p>For example, without any <code>+</code> and <code>-</code> symbols:</p>

    <pre class="prettyprint lang-config">&lt;Directory "/web/docs"&gt;
  Options Indexes FollowSymLinks
&lt;/Directory&gt;

&lt;Directory "/web/docs/spec"&gt;
  Options Includes
&lt;/Directory&gt;</pre>


    <p>then only <code>Includes</code> will be set for the
    <code>/web/docs/spec</code> directory. However if the second
    <code class="directive">Options</code> directive uses the <code>+</code> and
    <code>-</code> symbols:</p>

    <pre class="prettyprint lang-config">&lt;Directory "/web/docs"&gt;
  Options Indexes FollowSymLinks
&lt;/Directory&gt;

&lt;Directory "/web/docs/spec"&gt;
  Options +Includes -Indexes
&lt;/Directory&gt;</pre>


    <p>then the options <code>FollowSymLinks</code> and
    <code>Includes</code> are set for the <code>/web/docs/spec</code>
    directory.</p>

    <div class="note"><h3>Note</h3>
      <p>Using <code>-IncludesNOEXEC</code> or
      <code>-Includes</code> disables server-side includes completely
      regardless of the previous setting.</p>
    </div>

    <p>The default in the absence of any other settings is
    <code>FollowSymlinks</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="Protocol" id="Protocol">Protocol</a> <a name="protocol" id="protocol">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Protocol for a listening socket</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>Protocol <var>protocol</var></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>Core</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache 2.1.5 and later.
On Windows, from Apache 2.3.3 and later.</td></tr>
</table>
    <p>This directive specifies the protocol used for a specific listening socket.
       The protocol is used to determine which module should handle a request and
       to apply protocol specific optimizations with the <code class="directive">AcceptFilter</code>
       directive.</p>

    <p>You only need to set the protocol if you are running on non-standard ports;
       otherwise, <code>http</code> is assumed for port 80 and <code>https</code>
       for port 443.</p>

    <p>For example, if you are running <code>https</code> on a non-standard port,
       specify the protocol explicitly:</p>

    <pre class="prettyprint lang-config">Protocol https</pre>


    <p>You can also specify the protocol using the <code class="directive"><a href="../mod/mpm_common.html#listen">Listen</a></code> directive.</p>

<h3>See also</h3>
<ul>
<li><code class="directive"><a href="#acceptfilter">AcceptFilter</a></code></li>
<li><code class="directive"><a href="../mod/mpm_common.html#listen">Listen</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="Protocols" id="Protocols">Protocols</a> <a name="protocols" id="protocols">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Protocols available for a server/virtual host</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>Protocols <var>protocol</var> ...</code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>Protocols http/1.1</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>Core</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Only available from Apache 2.4.17 and later.</td></tr>
</table>
        <p>This directive specifies the list of protocols supported for a
            server/virtual host. The list determines the allowed protocols
            a client may negotiate for this server/host.</p>
        
        <p>You need to set protocols if you want to extend the available
            protocols for a server/host. By default, only the http/1.1 protocol
            (which includes the compatibility with 1.0 and 0.9 clients) is
            allowed.</p>
        
        <p>For example, if you want to support HTTP/2 for a server with TLS, 
            specify:</p>
        
        <pre class="prettyprint lang-config">Protocols h2 http/1.1</pre>


        <p>Valid protocols are <code>http/1.1</code> for http and https connections,
            <code>h2</code> on https connections and <code>h2c</code> for http
            connections. Modules may enable more protocols.</p>
        
        <p>It is safe to specify protocols that are unavailable/disabled. Such
        protocol names will simply be ignored.</p>
        
        <p>Protocols specified in base servers are inherited for virtual hosts 
            only if the virtual host has no own Protocols directive. Or, the other
            way around, Protocols directives in virtual hosts replace any
            such directive in the base server.
        </p>

    
<h3>See also</h3>
<ul>
<li><code class="directive"><a href="#protocolshonororder">ProtocolsHonorOrder</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="ProtocolsHonorOrder" id="ProtocolsHonorOrder">ProtocolsHonorOrder</a> <a name="protocolshonororder" id="protocolshonororder">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Determines if order of Protocols determines precedence during negotiation</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ProtocolsHonorOrder On|Off</code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ProtocolsHonorOrder On</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>Core</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Only available from Apache 2.4.17 and later.</td></tr>
</table>
        <p>This directive specifies if the server should honor the order in which
        the <code class="directive">Protocols</code> directive lists protocols.</p>
        
        <p>If configured Off, the client supplied list order of protocols has 
            precedence over the order in the server configuration.</p>
        
        <p>With <code class="directive">ProtocolsHonorOrder</code> set to <code>on</code> 
            (default), the client ordering does not matter and only the ordering 
            in the server settings influences the outcome of the protocol 
            negotiation.</p>
        
    
<h3>See also</h3>
<ul>
<li><code class="directive"><a href="#protocols">Protocols</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="QualifyRedirectURL" id="QualifyRedirectURL">QualifyRedirectURL</a> <a name="qualifyredirecturl" id="qualifyredirecturl">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Controls whether the REDIRECT_URL environment variable is
             fully qualified</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>QualifyRedirectURL ON|OFF</code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>QualifyRedirectURL OFF</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory</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>Core</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Directive supported in 2.4.18 and later. 2.4.17 acted
as if 'QualifyRedirectURL ON' was configured.</td></tr>
</table>
    <p>This directive controls whether the server will ensure that the 
    REDIRECT_URL environment variable is fully qualified.  By default, 
    the variable contains the verbatim URL requested by the client, 
    such as "/index.html".  With <code class="directive"><a href="#qualifyredirecturl on">QualifyRedirectURL ON</a></code>, the same request would result in a
    value such as "http://www.example.com/index.html".</p>
    <p>Even without this directive set, when a request is issued against a 
    fully qualified URL, REDIRECT_URL will remain fully qualified.
    </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="RegisterHttpMethod" id="RegisterHttpMethod">RegisterHttpMethod</a> <a name="registerhttpmethod" id="registerhttpmethod">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Register non-standard HTTP methods</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>RegisterHttpMethod <var>method</var> [<var>method</var> [...]]</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>Core</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
</table>
<p>HTTP Methods that are not conforming to the relevant RFCs are normally
rejected by request processing in Apache HTTPD. To avoid this, modules
can register non-standard HTTP methods they support.
The <code class="directive">RegisterHttpMethod</code> allows to register such
methods manually. This can be useful for if such methods are forwared
for external processing, e.g. to a CGI script.</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="RLimitCPU" id="RLimitCPU">RLimitCPU</a> <a name="rlimitcpu" id="rlimitcpu">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Limits the CPU consumption of processes launched
by Apache httpd children</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>RLimitCPU <var>seconds</var>|max [<var>seconds</var>|max]</code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>Unset; uses operating system defaults</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>All</td></tr>
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
</table>
    <p>Takes 1 or 2 parameters. The first parameter sets the soft
    resource limit for all processes and the second parameter sets
    the maximum resource limit. Either parameter can be a number,
    or <code>max</code> to indicate to the server that the limit should
    be set to the maximum allowed by the operating system
    configuration. Raising the maximum resource limit requires that
    the server is running as <code>root</code> or in the initial startup
    phase.</p>

    <p>This applies to processes forked from Apache httpd children
    servicing requests, not the Apache httpd children themselves. This
    includes CGI scripts and SSI exec commands, but not any
    processes forked from the Apache httpd parent, such as piped
    logs.</p>

    <p>CPU resource limits are expressed in seconds per
    process.</p>

<h3>See also</h3>
<ul>
<li><code class="directive"><a href="#rlimitmem">RLimitMEM</a></code></li>
<li><code class="directive"><a href="#rlimitnproc">RLimitNPROC</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="RLimitMEM" id="RLimitMEM">RLimitMEM</a> <a name="rlimitmem" id="rlimitmem">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Limits the memory consumption of processes launched
by Apache httpd children</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>RLimitMEM <var>bytes</var>|max [<var>bytes</var>|max]</code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>Unset; uses operating system defaults</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>All</td></tr>
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
</table>
    <p>Takes 1 or 2 parameters. The first parameter sets the soft
    resource limit for all processes and the second parameter sets
    the maximum resource limit. Either parameter can be a number,
    or <code>max</code> to indicate to the server that the limit should
    be set to the maximum allowed by the operating system
    configuration. Raising the maximum resource limit requires that
    the server is running as <code>root</code> or in the initial startup
    phase.</p>

    <p>This applies to processes forked from Apache httpd children
    servicing requests, not the Apache httpd children themselves. This
    includes CGI scripts and SSI exec commands, but not any
    processes forked from the Apache httpd parent, such as piped
    logs.</p>

    <p>Memory resource limits are expressed in bytes per
    process.</p>

<h3>See also</h3>
<ul>
<li><code class="directive"><a href="#rlimitcpu">RLimitCPU</a></code></li>
<li><code class="directive"><a href="#rlimitnproc">RLimitNPROC</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="RLimitNPROC" id="RLimitNPROC">RLimitNPROC</a> <a name="rlimitnproc" id="rlimitnproc">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Limits the number of processes that can be launched by
processes launched by Apache httpd children</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>RLimitNPROC <var>number</var>|max [<var>number</var>|max]</code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>Unset; uses operating system defaults</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>All</td></tr>
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
</table>
    <p>Takes 1 or 2 parameters. The first parameter sets the soft
    resource limit for all processes, and the second parameter sets
    the maximum resource limit. Either parameter can be a number,
    or <code>max</code> to indicate to the server that the limit
    should be set to the maximum allowed by the operating system
    configuration. Raising the maximum resource limit requires that
    the server is running as <code>root</code> or in the initial startup
    phase.</p>

    <p>This applies to processes forked from Apache httpd children
    servicing requests, not the Apache httpd children themselves. This
    includes CGI scripts and SSI exec commands, but not any
    processes forked from the Apache httpd parent, such as piped
    logs.</p>

    <p>Process limits control the number of processes per user.</p>

    <div class="note"><h3>Note</h3>
      <p>If CGI processes are <strong>not</strong> running
      under user ids other than the web server user id, this directive
      will limit the number of processes that the server itself can
      create. Evidence of this situation will be indicated by
      <strong><code>cannot fork</code></strong> messages in the
      <code>error_log</code>.</p>
    </div>