User-Agent: *
Disallow: /libxslt/
Sitemap: http://nginx.org/sitemap.xml


body {
    background: white;
    color: black;
    font-family: sans-serif;
    line-height: 1.4em;
    text-align: center;
    margin: 0;
    padding: 0;
}

#banner {
    background: black;
    color: #F2F2F2;
    line-height: 1.2em;
    padding: .3em 1em .3em 1em;
    box-shadow: 0 5px 10px black;
}

#banner a {
    color: #00B140;
}

#main {
    text-align: left;
    margin: 0 auto;
    min-width: 32em;
    max-width: 66em;
}

#menu {
    float: right;
    width: 13em;
    padding: 0;
    border-left: 2px solid #DDD;
}
.nav ul{
    margin:0;
    padding:20px;
}
.nav h1{
    padding:0 20px;
}
.nav ul li{
    list-style-type:none;
    padding:0;
    margin:0;
}

#content {
    margin-right: 13.5em;
    padding: 0 2.5em 0 1.5em;
}

h1 {
    display: block;
    font-size: 3em;
    text-align: left;
    margin: 0.5rem 0 0 0;
}

h1 img {
    width: 100%;
}

h2 {
    font-size: 2rem;
    line-height: 2.25rem;
    margin: 1rem 0 .5rem 0;
    overflow-wrap: break-word;
}

h4 {
    font-size: 1.5rem;
    margin: 2rem 0 .5rem 0;
}
/* Center field override */
center h4 {
    text-align: left!important;
}

h5 {
    font-size: 1.25rem;
    text-align: center;
    margin: 0.25rem 0 0 0;
}

p {
    text-align: justify;
    margin-bottom: 0;
}

table.news p {
    margin-top: 0;
}

table.news td {
    vertical-align: baseline;
}

table.news .date {
    text-align: right;
    padding: 0.75rem 0.5rem 0 0;
    white-space: nowrap;
}

table.donors td {
    vertical-align: baseline;
}

table.donors li {
    text-align: left;
}

/* News Archive button */
.dropbtn {
    background-color: #808080;
    color: white;
    padding: 0.3rem;
    font-size: 1rem;
    border: 1px solid #606060;
}
.dropdown {
    position: relative;
    display: inline-block;
    padding-bottom: 0.5em;
}
.dropdown-content {
    display: none;
    position: absolute;
    background-color: #f0f0f0;
    min-width: 160px;
    box-shadow: 0px 8px 12px 0px #909090;
    z-index: 1;
}
.dropdown-content a {
    padding: 0.33em;
    text-decoration: none;
    display: block;
}
.dropdown-content a:hover {background-color: #a0a0a0;}
.dropdown:hover .dropdown-content {display: block;}
.dropdown:hover .dropbtn {background-color: #909090;}

div.directive {
    background: #F2F2F2;
    line-height: 1em;
    margin: 1em 0 1em -1em;
    padding: .7em .7em .7em 1em;
    border-top: 2px solid #DDD;
    width:100%;
}

div.directive th {
    padding-left: 0;
    padding-right: .5em;
    vertical-align: baseline;
    text-align: left;
    font-weight: normal;
}

div.directive td {
    vertical-align: baseline;
}

div.directive pre {
    padding: 0;
    margin: 0;
}

div.directive code {
    background: none!important;
    padding: 0!important;
    border: none;
}

div.directive p {
    margin: .5em 0 0 .1em;
    font-size: .8em;
}

a.notrans {
    color: #808080;
    text-decoration:none;
}

span.initial {
    font-size: 200%;
    float: left;
    padding-right: 10pt;
}

ul, ol {
    margin: .5em 0 1em 1em;
    padding: 0 .5em;
}

ol {
    list-style-position: inside;
}

li {
    padding: .5em 0 0 1px;
}

.compact li {
    padding-top: 0;
}

dl {
    margin: .5em 0 1em 0;
}

dt {
    margin: 1em 0 0 0!important;
    font-size: 0.9rem;
}

.compact dt {
    margin-bottom: .2em;
}

dd {
    margin: 0.25rem 0 1.5rem 1rem;
    padding-left: 1px;
    text-align: justify;
}

td.list {
    background: #f2f2f2;
}

blockquote {
    margin: 0.5rem 0 0 0;
    padding: 0;
}

li blockquote, dd blockquote {
    margin: .7em 0;
}

blockquote.note {
    padding: 0.5rem;
    border: 1px dotted #999;
    line-height: 1.2em;
    text-align: justify;
}

pre {
    border: 0;
    display: block;
    margin: 1em 0;
    padding: 0.6em 1em;
    overflow-x: auto;
    line-height: 1.05rem;
}

code,.legacy{
    font-size: 100%;
    padding: 3px 7px;
    overflow-x: scroll;
    background: #eee;
}

pre code{
    background: none;
    padding: 0;
    border-radius: 0;
}

blockquote pre {
    background-color: #f8f8f8!important;
    color: #222!important;
    margin: 0;
    border: 1px solid #ddd;
}

blockquote.terminal pre{
    background-color: #444!important;
    color: #fff!important;
}

blockquote.example {
    line-height: 1em;
}

sup {
    font-size: 50%;
}

.video {
    position: relative;
    padding-bottom: 56.25%;
    overflow: hidden;
}

.video iframe, .video object, .video embed {
    position: absolute;
    top:0;
    left:0;
    width:100%;
    height:100%;
}

@media screen and (max-width:750px) {
    #main {
        padding: 20px;
        min-width: inherit;
    }
    #main #content {
        width: 100%!important;
        padding: 0;
        border: none;
    }

    #banner-content {
        max-width: 70vw;
    }

    #menu {
        text-align: left;
    }

    /* Menu Mobile */
    :root {
        --white: #f9f9f9;
        --black: #000;
        --gray: #85888C;
        --green: #b6d7a8;
        color-scheme: light dark;
    } /* variables*/

    /* Nav menu */
    .nav {
        width: 15rem;
        height: 100%;
        max-height: 0;
        position: fixed;
        top: 50px;
        right: 0;
        border-left: 1px solid #909090;
        background-color: var(--white);
        overflow: hidden;
        transition: .5s ease-in-out;
    }
    .nav ul {
        margin: 0;
        padding: 20px;
    }
    .nav h1 {
        padding: 0 20px;
    }
    .nav ul li {
        list-style-type: none;
        padding:0;
        margin:0;
    }

    .hamb {
        cursor: pointer;
        float: right;
        position: absolute;
        top: 0;
        right: 0.25em;
        width: 3.5em;
        padding-top: 1.5em;
        z-index: 1100;
    }
    .hamb-line {
        background: var(--green);
        display: block;
        position: relative;
        height: 0.3em;
        width: 2.75em;
        border-radius:3px;
    }
    .hamb-line::before,.hamb-line::after {
        background: var(--green);
        content: '';
        display: block;
        height: 100%;
        position: absolute;
        transition: all .2s ease-in-out;
        width: 100%;
        border-radius:3px;
    }
    .hamb-line::before{
        top: 10px;
    }
    .hamb-line::after{
        top: -10px;
    }
    .side-menu {
        display: none;
    } /* Hide checkbox */
    .side-menu:checked ~ .nav{
        max-height: 100%;
        top: 50px;

    }
    .side-menu:checked ~ .hamb .hamb-line {
        background: transparent;
    }
    .side-menu:checked ~ .hamb .hamb-line::before {
        transform: rotate(-45deg);
        top: 0;
    }
    .side-menu:checked ~ .hamb .hamb-line::after {
        transform: rotate(45deg);
        top: 0;
    }

    code {
        white-space: pre-line;
    }
}

@media screen and (min-width:750px){
    .side-menu,.hamb-line {
        display: none;
    }
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
	body {
		background-color: #1c262d;
        color:#eee;
	}
    h1,h2,h3,h4,h5,h6,p {
        color: #eee;
    }
    a {
        color: #55A4F1;
        text-decoration: underline;
    }
    a:visited {
        color: #8b79c0!important;
    }
    .nav {
        background:var(--black);
    }
    #menu a {
        color: #55A4F1;
    }
    blockquote pre {
        color: #ddd!important;
        background: #0f1b29!important;
        border: 1px solid #132235;
    }
    div.directive {
        background: #0c1622!important;
        border-top: 2px solid #203c5e!important;
    }
    code {
        background:#0c1622;
        color: #ddd!important;
    }
    .lightimage {
        display: none!important;
    }
    .darkimageWrapper, .darkimage {
        display: block!important;
    }
    .dropbtn {background-color: #202020;}
    .dropdown-content {
        background-color: #404040;
        box-shadow: 0px 8px 12px 0px #101010;
    }
    .dropdown-content a:hover {background-color: #242424;}
    .dropdown:hover .dropbtn {background-color: #202020;}
}


<?xml version="1.0" encoding="UTF-8"?>
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 644.5965344 182.2748198">
  <g>
    <g>
      <g>
        <path d="M303.7587022,38.6669983v94.8271484h-20.1674805l-38.5991211-58.3652344v58.3652344h-20.1674805V38.6669983h20.1674805l38.5991211,58.6328125v-58.6328125h20.1674805Z" style="fill: #222;"/>
        <path d="M381.7108506,72.8584045v-1.4697266c0-9.75-8.6816406-16.0273438-22.8388672-16.0273438-14.2910156,0-23.105957,6.2773438-23.105957,16.0273438v29.3837891c0,9.75,8.6816406,16.0273438,22.972168,16.0273438,14.2910156,0,22.9726562-6.2773438,22.9726562-16.0273438h-23.3730469v-18.6992188h44.0751953v20.4355469c0,20.1669922-15.8935547,32.9892578-43.5410156,32.9892578-27.7802734,0-43.8076172-12.8222656-43.8076172-32.9892578v-32.8564453c0-20.1669922,15.8935547-32.9892578,43.6738281-32.9892578,27.78125,0,43.6748047,12.8222656,43.6748047,32.9892578v3.2060547h-20.7021484Z" style="fill: #222;"/>
        <path d="M413.7987412,38.6669983h20.7011719v94.8271484h-20.7011719V38.6669983Z" style="fill: #222;"/>
        <path d="M526.0126084,38.6669983v94.8271484h-20.1669922l-38.5996094-58.3652344v58.3652344h-20.1669922V38.6669983h20.1669922l38.5996094,58.6328125v-58.6328125h20.1669922Z" style="fill: #222;"/>
        <path d="M591.6776475,86.748053l31.5200195,46.7460938h-24.7084961l-19.9003906-29.5166016-20.7021484,29.5166016h-23.3730469l31.6533203-47.9482422-31.6533203-46.8789062h24.7089844l20.3007813,30.0507812,21.5029297-30.0507812h23.7749023l-33.1235352,48.0810547Z" style="fill: #222;"/>
      </g>
      <g>
        <path d="M226.025792,172.2460999v-.7685547h3.9360352v.8964844c0,2.1757812,2.5917969,3.7431641,6.2075195,3.7431641,2.9755859,0,5.503418-1.1513672,5.503418-3.4550781,0-5.1845703-15.1347656-1.1201172-15.1347656-9.7919922,0-3.4238281,2.4956055-6.6552734,9.1191406-6.6552734,6.527832,0,9.4394531,3.0400391,9.4394531,7.1357422v.8632812h-3.9355469v-.8632812c0-1.984375-2.1757812-3.4882812-5.5678711-3.4882812-3.0717773,0-5.0874023,1.1845703-5.0874023,3.0078125,0,4.2880859,15.0708008,1.1523438,15.1347656,9.7597656,0,3.9033203-3.199707,7.1347656-9.5991211,7.1347656-6.4316406,0-10.015625-3.1669922-10.015625-7.5185547Z" style="fill: #999;"/>
        <path d="M269.1830186,163.2539124v1.6640625c0,4.0634766-2.7836914,6.5917969-7.6157227,6.5917969h-7.0073242v7.8076172h-3.9355469v-22.6542969h10.9111328c4.831543,0,7.6474609,2.5273438,7.6474609,6.5908203ZM265.2469834,163.1259827c0-1.7919922-1.1518555-2.8154297-3.4555664-2.8154297h-7.2314453v7.5517578h7.2314453c2.2719727,0,3.4555664-1.0244141,3.4555664-2.8164062v-1.9199219Z" style="fill: #999;"/>
        <path d="M273.9652452,171.9257874v-7.8076172c0-4.8632812,3.487793-7.9033203,10.2392578-7.9033203s10.2709961,3.0400391,10.2709961,7.9033203v7.8076172c0,4.8320312-3.5195312,7.8388672-10.2392578,7.8388672-6.7514648,0-10.2709961-3.0068359-10.2709961-7.8388672ZM290.5399522,171.5419983v-7.0400391c0-2.9111328-1.855957-4.6396484-6.3037109-4.6396484s-6.3354492,1.7285156-6.3354492,4.6396484v7.0400391c0,2.8798828,1.855957,4.5751953,6.3037109,4.5751953,4.4794922,0,6.3354492-1.6953125,6.3354492-4.5751953Z" style="fill: #999;"/>
        <path d="M318.0399522,156.663092v22.6542969h-3.8393555l-10.4956055-15.6787109v15.6787109h-3.8393555v-22.6542969h3.8393555l10.4956055,15.7421875v-15.7421875h3.8393555Z" style="fill: #999;"/>
        <path d="M323.0365342,172.2460999v-.7685547h3.9360352v.8964844c0,2.1757812,2.5917969,3.7431641,6.2075195,3.7431641,2.9755859,0,5.503418-1.1513672,5.503418-3.4550781,0-5.1845703-15.1347656-1.1201172-15.1347656-9.7919922,0-3.4238281,2.4956055-6.6552734,9.1191406-6.6552734,6.527832,0,9.4394531,3.0400391,9.4394531,7.1357422v.8632812h-3.9355469v-.8632812c0-1.984375-2.1757812-3.4882812-5.5678711-3.4882812-3.0717773,0-5.0874023,1.1845703-5.0874023,3.0078125,0,4.2880859,15.0708008,1.1523438,15.1347656,9.7597656,0,3.9033203-3.199707,7.1347656-9.5991211,7.1347656-6.4316406,0-10.015625-3.1669922-10.015625-7.5185547Z" style="fill: #999;"/>
        <path d="M347.4012803,171.9257874v-7.8076172c0-4.8632812,3.487793-7.9033203,10.2392578-7.9033203,6.7509766,0,10.2714844,3.0400391,10.2714844,7.9033203v7.8076172c0,4.8320312-3.5205078,7.8388672-10.2392578,7.8388672-6.7519531,0-10.2714844-3.0068359-10.2714844-7.8388672ZM363.9754991,171.5419983v-7.0400391c0-2.9111328-1.8554688-4.6396484-6.3027344-4.6396484-4.4482422,0-6.3359375,1.7285156-6.3359375,4.6396484v7.0400391c0,2.8798828,1.8554688,4.5751953,6.3037109,4.5751953,4.4794922,0,6.3349609-1.6953125,6.3349609-4.5751953Z" style="fill: #999;"/>
        <path d="M387.7333116,170.038092l4.1269531,9.2792969h-4.0957031l-4.0634766-8.7353516h-6.4628906v8.7353516h-3.9365234v-22.6542969h10.9111328c4.8320312,0,7.6474609,2.4316406,7.6474609,6.5273438v.8642578c0,2.9755859-1.4716797,5.0869141-4.1269531,5.9833984ZM387.9247178,163.0625061c0-1.7919922-1.1513672-2.7519531-3.4550781-2.7519531h-7.2314453v6.6230469h7.2314453c2.2714844,0,3.4550781-.9599609,3.4550781-2.7509766v-1.1201172Z" style="fill: #999;"/>
        <path d="M400.74796,160.310553v6.1113281h11.1992187v3.6474609h-11.1992187v5.5996094h12.5429687v3.6484375h-16.4794922v-22.6542969h16.4794922v3.6474609h-12.5429687Z" style="fill: #999;"/>
        <path d="M437.8856553,164.5019592v6.9755859c0,4.8320312-3.4882812,7.8398438-9.7597656,7.8398438h-9.8232422v-22.6542969h9.7919922c6.3027344,0,9.7910156,3.0078125,9.7910156,7.8388672ZM433.9501084,164.8857483c0-2.8789062-1.8564453-4.5751953-5.5673828-4.5751953h-6.1435547v15.3583984h6.1113281c3.7431641,0,5.5996094-1.6953125,5.5996094-4.5751953v-6.2080078Z" style="fill: #999;"/>
        <path d="M472.3495225,171.7978577v1.5039062c0,3.5517578-2.7841797,6.015625-6.7519531,6.015625h-11.9033203v-22.6542969h11.1679688c3.9677734,0,6.7509766,2.1435547,6.7509766,5.4394531v1.5673828c0,1.4404297-.671875,2.7841797-1.8876953,3.7119141,1.6640625.9599609,2.6240234,2.6240234,2.6240234,4.4160156ZM457.6307725,160.1826233v5.7910156h7.2314453c1.5996094,0,2.8154297-.7353516,2.8154297-2.2714844v-1.5039062c0-1.34375-1.2480469-2.015625-2.7841797-2.015625h-7.2626953ZM468.4139756,171.7978577c0-1.4404297-1.0878906-2.3359375-2.8164062-2.3359375h-7.9667969v6.3359375h7.9345703c1.7607422,0,2.8486328-.9599609,2.8486328-2.3681641v-1.6318359Z" style="fill: #999;"/>
        <path d="M487.3446397,171.2861389v8.03125h-3.9355469v-8l-8.1914062-14.6542969h4.3837891l5.7910156,10.1748047,5.8242188-10.1748047h4.3515625l-8.2236328,14.6230469Z" style="fill: #999;"/>
        <path d="M514.0975694,160.310553v6.8476562h11.5185547v3.6474609h-11.5185547v8.5117188h-3.9365234v-22.6542969h16.4794922v3.6474609h-12.5429687Z" style="fill: #999;"/>
        <path d="M547.669835,171.4453186v1.6005859c0,4.0957031-3.2958984,6.71875-8.3828125,6.71875-5.0556641,0-8.3515625-2.6230469-8.3515625-6.7509766v-1.5683594h3.9355469v1.7919922c0,1.9199219,1.5996094,2.9755859,4.4160156,2.9755859,2.8476562,0,4.4472656-1.0556641,4.4472656-2.9755859v-2.015625c0-1.6640625-1.3115234-2.5595703-3.2314453-2.5595703h-8.8955078v-11.9990234h15.2304688v3.6474609h-11.2949219v4.7998047h5.1835938c4.2558594,0,6.9433594,2.4316406,6.9433594,6.3349609Z" style="fill: #999;"/>
      </g>
    </g>
    <g>
      <path d="M1.5153687,127.9695744c.8008272,1.3890643,1.9298284,2.472657,3.2322044,3.2074385l66.1219075,38.1755109.0020629-.0020629c1.2899922.7595475,2.7905137,1.1950498,4.394225,1.1950498,1.6037192,0,3.1063035-.4355023,4.3942329-1.1950498l66.1239753-38.1755109c1.3023694-.7347814,2.4272388-1.8163113,3.2301298-3.2053756.802891-1.3890604,1.1764723-2.9060925,1.1620323-4.4024843V47.2160645l-.0020629-.0020629c.0123771-1.494325-.3612041-3.01342-1.1620323-4.4024843-.802891-1.3890643-1.9318862-2.4705981-3.2321927-3.2074385L79.6558756,1.428568v-.0020629c-1.2879294-.7595554-2.7884508-1.1950537-4.39217-1.1950537-1.6016485,0-3.1021699.4354984-4.3900993,1.1950537v.0020629L4.7517008,39.6040789c-1.3023758.7368404-2.4313769,1.8183741-3.2342681,3.2074385-.8008271,1.3890643-1.1744089,2.9081593-1.1620249,4.4024843l-.0020641.0020629v76.3510257c-.0144479,1.4963918.3591339,3.0134239,1.159961,4.4024843" style="fill: #009639;"/>
      <path d="M54.0940071,114.4556145c0,4.6955749-3.8059967,8.5036305-8.5036305,8.5036305-4.6955709,0-8.5036266-3.8080557-8.5036266-8.5036305l.0020629.0020668.0082554-58.3736997c0-4.5221928,3.9958816-8.2621389,9.6553328-8.2621389,4.0516063,0,8.7286036,1.6346778,11.5913566,5.1826682l2.5696623,3.075345,35.5253539,42.5140152v-42.2725275h-.0041257c0-4.6955749,3.8080517-8.5036266,8.5056895-8.5036266,4.6955749,0,8.5015638,3.8080517,8.5015638,8.5036266h-.0020629l-.0082514,58.3695661c0,4.5221967-3.9979445,8.2621428-9.6553368,8.2621428-4.053673,0-8.7286036-1.6326149-11.5913566-5.1826721l-38.0950163-45.5893602v42.276661l.0041296-.0020668Z" style="fill: #fff;"/>
    </g>
  </g>
  <path d="M637.915229,125.5868811c.8466511.8080881,1.260838,1.8134396,1.260838,2.9869265,0,1.1622394-.4141869,2.1759545-1.260838,3.0042303-.8345645.8222195-1.8563237,1.2420976-3.0590871,1.2420976-1.1909716,0-2.2124115-.4198781-3.0531912-1.2420976-.8289634-.8282758-1.2552124-1.8419909-1.2552124-3.0042303,0-1.1734869.426249-2.1788384,1.2552124-2.9869265.8552001-.8424073,1.8710635-1.2536612,3.0531912-1.2536612,1.1998154,0,2.2154086.411254,3.0590871,1.2536612ZM638.4231607,125.0986252c-.9866787-.9537285-2.1688064-1.427853-3.5670188-1.427853-1.3690277,0-2.5567565.4741245-3.5260423,1.427853-.9863839.9566124-1.4654256,2.1159679-1.4654256,3.4751824,0,1.3563305.4728511,2.5214539,1.4480327,3.4722984.968991.9681483,2.1629105,1.4480407,3.5434352,1.4480407,1.3982124,0,2.5803401-.4798924,3.5670188-1.4480407.9719389-.9566124,1.4713215-2.1243593,1.4713215-3.4722984,0-1.3678664-.4993826-2.5185699-1.4713215-3.4751824ZM635.6034717,128.3367453c-.1954737.0827699-.5079563.1199452-.922438.1199452h-.8699153v-1.9587637h.8292336c.5368216,0,.9280145.074118,1.167388.2053106.2482173.1373049.3676339.4000344.3676339.7882166,0,.4170219-.1866298.6909989-.5719022.8452913ZM632.8421029,131.2380179h.9690155v-2.1185635h.7679162c.5079317,0,.872593.0510462,1.0798339.1767873.3413725.199859.5165054.6139691.5165054,1.2337619v.4337489l.0176877.1629442c.0117918.0314353.0117918.0455667.0147397.0654661.0055765.0259557.0085244.0346076.0262121.0458551h.8988298l-.0321326-.0625821c-.02916-.0400872-.0436297-.131509-.0465776-.2745538-.011497-.148236-.011497-.279745-.011497-.3997181v-.3997181c0-.2742654-.1022938-.5482425-.3006908-.8366393-.2045877-.2883969-.5256194-.4568207-.957494-.531255.3443205-.0539023.6131735-.1456125.7968307-.2540497.3676093-.2284103.5397695-.5938371.5397695-1.0679336,0-.6739835-.2741593-1.1365721-.8519574-1.3649824-.3183785-.125741-.8174664-.1941191-1.5031594-.1941191h-1.9238318v5.3855513Z" style="fill: #999;"/>
</svg>


<?xml version="1.0" encoding="UTF-8"?>
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 644.5965344 182.2748198">
  <g>
    <g>
      <g>
        <path d="M303.7587022,38.6669983v94.8271484h-20.1674805l-38.5991211-58.3652344v58.3652344h-20.1674805V38.6669983h20.1674805l38.5991211,58.6328125v-58.6328125h20.1674805Z" style="fill: #fff;"/>
        <path d="M381.7108506,72.8584045v-1.4697266c0-9.75-8.6816406-16.0273438-22.8388672-16.0273438-14.2910156,0-23.105957,6.2773438-23.105957,16.0273438v29.3837891c0,9.75,8.6816406,16.0273438,22.972168,16.0273438,14.2910156,0,22.9726562-6.2773438,22.9726562-16.0273438h-23.3730469v-18.6992188h44.0751953v20.4355469c0,20.1669922-15.8935547,32.9892578-43.5410156,32.9892578-27.7802734,0-43.8076172-12.8222656-43.8076172-32.9892578v-32.8564453c0-20.1669922,15.8935547-32.9892578,43.6738281-32.9892578,27.78125,0,43.6748047,12.8222656,43.6748047,32.9892578v3.2060547h-20.7021484Z" style="fill: #fff;"/>
        <path d="M413.7987412,38.6669983h20.7011719v94.8271484h-20.7011719V38.6669983Z" style="fill: #fff;"/>
        <path d="M526.0126084,38.6669983v94.8271484h-20.1669922l-38.5996094-58.3652344v58.3652344h-20.1669922V38.6669983h20.1669922l38.5996094,58.6328125v-58.6328125h20.1669922Z" style="fill: #fff;"/>
        <path d="M591.6776475,86.748053l31.5200195,46.7460938h-24.7084961l-19.9003906-29.5166016-20.7021484,29.5166016h-23.3730469l31.6533203-47.9482422-31.6533203-46.8789062h24.7089844l20.3007813,30.0507812,21.5029297-30.0507812h23.7749023l-33.1235352,48.0810547Z" style="fill: #fff;"/>
      </g>
      <g>
        <path d="M226.025792,172.2460999v-.7685547h3.9360352v.8964844c0,2.1757812,2.5917969,3.7431641,6.2075195,3.7431641,2.9755859,0,5.503418-1.1513672,5.503418-3.4550781,0-5.1845703-15.1347656-1.1201172-15.1347656-9.7919922,0-3.4238281,2.4956055-6.6552734,9.1191406-6.6552734,6.527832,0,9.4394531,3.0400391,9.4394531,7.1357422v.8632812h-3.9355469v-.8632812c0-1.984375-2.1757812-3.4882812-5.5678711-3.4882812-3.0717773,0-5.0874023,1.1845703-5.0874023,3.0078125,0,4.2880859,15.0708008,1.1523438,15.1347656,9.7597656,0,3.9033203-3.199707,7.1347656-9.5991211,7.1347656-6.4316406,0-10.015625-3.1669922-10.015625-7.5185547Z" style="fill: #fff;"/>
        <path d="M269.1830186,163.2539124v1.6640625c0,4.0634766-2.7836914,6.5917969-7.6157227,6.5917969h-7.0073242v7.8076172h-3.9355469v-22.6542969h10.9111328c4.831543,0,7.6474609,2.5273438,7.6474609,6.5908203ZM265.2469834,163.1259827c0-1.7919922-1.1518555-2.8154297-3.4555664-2.8154297h-7.2314453v7.5517578h7.2314453c2.2719727,0,3.4555664-1.0244141,3.4555664-2.8164062v-1.9199219Z" style="fill: #fff;"/>
        <path d="M273.9652452,171.9257874v-7.8076172c0-4.8632812,3.487793-7.9033203,10.2392578-7.9033203s10.2709961,3.0400391,10.2709961,7.9033203v7.8076172c0,4.8320312-3.5195312,7.8388672-10.2392578,7.8388672-6.7514648,0-10.2709961-3.0068359-10.2709961-7.8388672ZM290.5399522,171.5419983v-7.0400391c0-2.9111328-1.855957-4.6396484-6.3037109-4.6396484s-6.3354492,1.7285156-6.3354492,4.6396484v7.0400391c0,2.8798828,1.855957,4.5751953,6.3037109,4.5751953,4.4794922,0,6.3354492-1.6953125,6.3354492-4.5751953Z" style="fill: #fff;"/>
        <path d="M318.0399522,156.663092v22.6542969h-3.8393555l-10.4956055-15.6787109v15.6787109h-3.8393555v-22.6542969h3.8393555l10.4956055,15.7421875v-15.7421875h3.8393555Z" style="fill: #fff;"/>
        <path d="M323.0365342,172.2460999v-.7685547h3.9360352v.8964844c0,2.1757812,2.5917969,3.7431641,6.2075195,3.7431641,2.9755859,0,5.503418-1.1513672,5.503418-3.4550781,0-5.1845703-15.1347656-1.1201172-15.1347656-9.7919922,0-3.4238281,2.4956055-6.6552734,9.1191406-6.6552734,6.527832,0,9.4394531,3.0400391,9.4394531,7.1357422v.8632812h-3.9355469v-.8632812c0-1.984375-2.1757812-3.4882812-5.5678711-3.4882812-3.0717773,0-5.0874023,1.1845703-5.0874023,3.0078125,0,4.2880859,15.0708008,1.1523438,15.1347656,9.7597656,0,3.9033203-3.199707,7.1347656-9.5991211,7.1347656-6.4316406,0-10.015625-3.1669922-10.015625-7.5185547Z" style="fill: #fff;"/>
        <path d="M347.4012803,171.9257874v-7.8076172c0-4.8632812,3.487793-7.9033203,10.2392578-7.9033203,6.7509766,0,10.2714844,3.0400391,10.2714844,7.9033203v7.8076172c0,4.8320312-3.5205078,7.8388672-10.2392578,7.8388672-6.7519531,0-10.2714844-3.0068359-10.2714844-7.8388672ZM363.9754991,171.5419983v-7.0400391c0-2.9111328-1.8554688-4.6396484-6.3027344-4.6396484-4.4482422,0-6.3359375,1.7285156-6.3359375,4.6396484v7.0400391c0,2.8798828,1.8554688,4.5751953,6.3037109,4.5751953,4.4794922,0,6.3349609-1.6953125,6.3349609-4.5751953Z" style="fill: #fff;"/>
        <path d="M387.7333116,170.038092l4.1269531,9.2792969h-4.0957031l-4.0634766-8.7353516h-6.4628906v8.7353516h-3.9365234v-22.6542969h10.9111328c4.8320312,0,7.6474609,2.4316406,7.6474609,6.5273438v.8642578c0,2.9755859-1.4716797,5.0869141-4.1269531,5.9833984ZM387.9247178,163.0625061c0-1.7919922-1.1513672-2.7519531-3.4550781-2.7519531h-7.2314453v6.6230469h7.2314453c2.2714844,0,3.4550781-.9599609,3.4550781-2.7509766v-1.1201172Z" style="fill: #fff;"/>
        <path d="M400.74796,160.310553v6.1113281h11.1992187v3.6474609h-11.1992187v5.5996094h12.5429687v3.6484375h-16.4794922v-22.6542969h16.4794922v3.6474609h-12.5429687Z" style="fill: #fff;"/>
        <path d="M437.8856553,164.5019592v6.9755859c0,4.8320312-3.4882812,7.8398438-9.7597656,7.8398438h-9.8232422v-22.6542969h9.7919922c6.3027344,0,9.7910156,3.0078125,9.7910156,7.8388672ZM433.9501084,164.8857483c0-2.8789062-1.8564453-4.5751953-5.5673828-4.5751953h-6.1435547v15.3583984h6.1113281c3.7431641,0,5.5996094-1.6953125,5.5996094-4.5751953v-6.2080078Z" style="fill: #fff;"/>
        <path d="M472.3495225,171.7978577v1.5039062c0,3.5517578-2.7841797,6.015625-6.7519531,6.015625h-11.9033203v-22.6542969h11.1679688c3.9677734,0,6.7509766,2.1435547,6.7509766,5.4394531v1.5673828c0,1.4404297-.671875,2.7841797-1.8876953,3.7119141,1.6640625.9599609,2.6240234,2.6240234,2.6240234,4.4160156ZM457.6307725,160.1826233v5.7910156h7.2314453c1.5996094,0,2.8154297-.7353516,2.8154297-2.2714844v-1.5039062c0-1.34375-1.2480469-2.015625-2.7841797-2.015625h-7.2626953ZM468.4139756,171.7978577c0-1.4404297-1.0878906-2.3359375-2.8164062-2.3359375h-7.9667969v6.3359375h7.9345703c1.7607422,0,2.8486328-.9599609,2.8486328-2.3681641v-1.6318359Z" style="fill: #fff;"/>
        <path d="M487.3446397,171.2861389v8.03125h-3.9355469v-8l-8.1914062-14.6542969h4.3837891l5.7910156,10.1748047,5.8242188-10.1748047h4.3515625l-8.2236328,14.6230469Z" style="fill: #fff;"/>
        <path d="M514.0975694,160.310553v6.8476562h11.5185547v3.6474609h-11.5185547v8.5117188h-3.9365234v-22.6542969h16.4794922v3.6474609h-12.5429688Z" style="fill: #fff;"/>
        <path d="M547.669835,171.4453186v1.6005859c0,4.0957031-3.2958984,6.71875-8.3828125,6.71875-5.0556641,0-8.3515625-2.6230469-8.3515625-6.7509766v-1.5683594h3.9355469v1.7919922c0,1.9199219,1.5996094,2.9755859,4.4160156,2.9755859,2.8476562,0,4.4472656-1.0556641,4.4472656-2.9755859v-2.015625c0-1.6640625-1.3115234-2.5595703-3.2314453-2.5595703h-8.8955078v-11.9990234h15.2304688v3.6474609h-11.2949219v4.7998047h5.1835938c4.2558594,0,6.9433594,2.4316406,6.9433594,6.3349609Z" style="fill: #fff;"/>
      </g>
    </g>
    <path d="M150.1740466,47.2139939c.0123901-1.4943237-.361145-3.0134277-1.1619873-4.4024658-.8029175-1.3890991-1.9318848-2.4706421-3.2322388-3.2074585L79.6558581,1.4285325v-.0020142c-1.2879028-.7595825-2.7884521-1.1950684-4.3921509-1.1950684-1.6016235,0-3.1021729.4354858-4.3900757,1.1950684v.0020142L4.7516833,39.6040696c-1.3023682.7368164-2.4313354,1.8183594-3.2342529,3.2074585-.8008423,1.3890381-1.1743774,2.9081421-1.1620483,4.4024658l-.0020142.0020752v76.3510132c-.0144653,1.4963989.3591309,3.0134277,1.1599121,4.4024658h.0020752c.8008423,1.3890991,1.9298706,2.4726562,3.2322388,3.2074585l66.1218872,38.1754761.0020752-.0020142c1.289978.7595215,2.7905273,1.1950073,4.3942261,1.1950073s3.1062622-.4354858,4.3942261-1.1950073l66.1239624-38.1755371c1.3023682-.7348022,2.4272461-1.8162842,3.2301636-3.2053833.8028564-1.3890381,1.1764526-2.9060669,1.1619873-4.4024658V47.2160691l-.0020752-.0020752ZM113.4398547,56.3213548l-.0082397,58.3695679c0,4.5221558-3.9979858,8.262085-9.6553345,8.262085-4.0537109,0-8.7286377-1.6325684-11.5913696-5.1826172l-38.0950317-45.5893555v42.2766113l.0041504-.0020752c0,4.6956177-3.8060303,8.5036621-8.5036621,8.5036621-4.6955566,0-8.5036011-3.8080444-8.5036011-8.5036621l.0020752.0020752.0082397-58.3736572c0-4.5222168,3.9958496-8.262146,9.6553345-8.262146,4.0515747,0,8.7285767,1.6346436,11.5913696,5.1826782l2.5696411,3.0753174,35.5253296,42.5140381v-42.272522h-.0040894c0-4.6956177,3.8080444-8.5036621,8.5056763-8.5036621,4.6955566,0,8.5015869,3.8080444,8.5015869,8.5036621h-.0020752Z" style="fill: #fff;"/>
  </g>
  <path d="M637.915229,125.5868811c.8466511.8080881,1.260838,1.8134396,1.260838,2.9869265,0,1.1622394-.4141869,2.1759545-1.260838,3.0042303-.8345645.8222195-1.8563237,1.2420976-3.0590871,1.2420976-1.1909716,0-2.2124115-.4198781-3.0531912-1.2420976-.8289634-.8282758-1.2552124-1.8419909-1.2552124-3.0042303,0-1.1734869.426249-2.1788384,1.2552124-2.9869265.8552001-.8424073,1.8710635-1.2536612,3.0531912-1.2536612,1.1998154,0,2.2154086.411254,3.0590871,1.2536612ZM638.4231607,125.0986252c-.9866787-.9537285-2.1688064-1.427853-3.5670188-1.427853-1.3690277,0-2.5567565.4741245-3.5260423,1.427853-.9863839.9566124-1.4654256,2.1159679-1.4654256,3.4751824,0,1.3563305.4728511,2.5214539,1.4480327,3.4722984.968991.9681483,2.1629105,1.4480407,3.5434352,1.4480407,1.3982124,0,2.5803401-.4798924,3.5670188-1.4480407.9719389-.9566124,1.4713215-2.1243593,1.4713215-3.4722984,0-1.3678664-.4993826-2.5185699-1.4713215-3.4751824ZM635.6034717,128.3367453c-.1954737.0827699-.5079563.1199452-.922438.1199452h-.8699153v-1.9587637h.8292336c.5368216,0,.9280145.074118,1.167388.2053106.2482173.1373049.3676339.4000344.3676339.7882166,0,.4170219-.1866298.6909989-.5719022.8452913ZM632.8421029,131.2380179h.9690155v-2.1185635h.7679162c.5079317,0,.872593.0510462,1.0798339.1767873.3413725.199859.5165054.6139691.5165054,1.2337619v.4337489l.0176877.1629442c.0117918.0314353.0117918.0455667.0147397.0654661.0055765.0259557.0085244.0346076.0262121.0458551h.8988298l-.0321326-.0625821c-.02916-.0400872-.0436297-.131509-.0465776-.2745538-.011497-.148236-.011497-.279745-.011497-.3997181v-.3997181c0-.2742654-.1022938-.5482425-.3006908-.8366393-.2045877-.2883969-.5256194-.4568207-.957494-.531255.3443205-.0539023.6131735-.1456125.7968307-.2540497.3676093-.2284103.5397695-.5938371.5397695-1.0679336,0-.6739835-.2741593-1.1365721-.8519574-1.3649824-.3183785-.125741-.8174664-.1941191-1.5031594-.1941191h-1.9238318v5.3855513Z" style="fill: #fff;"/>
</svg>


<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>Beginner’s Guide</title><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="stylesheet" href="../../css/style_en.css">

Planning your ingress-nginx migration? Start here:
kubernetes.nginx.org.

<input class="side-menu" type="checkbox" id="side-menu">

english

русский

news

about

download

security

documentation

faq

books

community

enterprise

community forum (new)

x.com

blog

njs

ingress controller

gateway fabric

Beginner’s Guide

Starting, Stopping, and Reloading Configuration
Configuration File’s Structure
Serving Static Content
Setting Up a Simple Proxy Server
Setting Up FastCGI Proxying

This guide gives a basic introduction to nginx and describes some
simple tasks that can be done with it.
It is supposed that nginx is already installed on the reader’s machine.
If it is not, see the Installing nginx page.
This guide describes how to start and stop nginx, and reload its
configuration, explains the structure
of the configuration file and describes how to set up nginx
to serve out static content, how to configure nginx as a proxy
server, and how to connect it with a FastCGI application.

nginx has one master process and several worker processes.
The main purpose of the master process is to read and evaluate configuration,
and maintain worker processes.
Worker processes do actual processing of requests.
nginx employs event-based model and OS-dependent mechanisms to efficiently
distribute requests among worker processes.
The number of worker processes is defined in the configuration file and
may be fixed for a given configuration or automatically adjusted to the
number of available CPU cores (see
worker_processes).

The way nginx and its modules work is determined in the configuration file.
By default, the configuration file is named nginx.conf
and placed in the directory
/usr/local/nginx/conf,
/etc/nginx, or
/usr/local/etc/nginx.

Starting, Stopping, and Reloading Configuration

To start nginx, run the executable file.
Once nginx is started, it can be controlled by invoking the executable
with the -s parameter.
Use the following syntax:

nginx -s signal

Where signal may be one of the following:

stop — fast shutdown

quit — graceful shutdown

reload — reloading the configuration file

reopen — reopening the log files

For example, to stop nginx processes with waiting for the worker processes
to finish serving current requests, the following command can be executed:

nginx -s quit

This command should be executed under the same user that
started nginx.

Changes made in the configuration file
will not be applied until the command to reload configuration is
sent to nginx or it is restarted.
To reload configuration, execute:

nginx -s reload

Once the master process receives the signal to reload configuration,
it checks the syntax validity
of the new configuration file and tries to apply the configuration provided
in it.
If this is a success, the master process starts new worker processes
and sends messages to old worker processes, requesting them to
shut down.
Otherwise, the master process rolls back the changes and
continues to work with the old configuration.
Old worker processes, receiving a command to shut down,
stop accepting new connections and continue to service current requests until
all such requests are serviced.
After that, the old worker processes exit.

A signal may also be sent to nginx processes with the help of Unix tools
such as the kill utility.
In this case a signal is sent directly to a process with a given process ID.
The process ID of the nginx master process is written, by default, to the
nginx.pid in the directory
/usr/local/nginx/logs or
/var/run.
For example, if the master process ID is 1628, to send the QUIT signal
resulting in nginx’s graceful shutdown, execute:

kill -s QUIT 1628

For getting the list of all running nginx processes, the ps
utility may be used, for example, in the following way:

ps -ax | grep nginx

For more information on sending signals to nginx, see
Controlling nginx.

Configuration File’s Structure

nginx consists of modules which are controlled by directives specified
in the configuration file.
Directives are divided into simple directives and block directives.
A simple directive consists of the name and parameters separated by spaces
and ends with a semicolon (;).
A block directive has the same structure as a simple directive, but
instead of the semicolon it ends with a set of additional instructions
surrounded by braces ({ and }).
If a block directive can have other directives inside braces,
it is called a context (examples:
events,
http,
server,
and
location).

Directives placed in the configuration file outside
of any contexts are considered to be in the
main context.
The events and http directives
reside in the main context, server
in http, and location in
server.

The rest of a line after the # sign is considered a comment.

Serving Static Content

An important web server task is serving out
files (such as images or static HTML pages).
You will implement an example where, depending on the request,
files will be served from different local directories: /data/www
(which may contain HTML files) and /data/images
(containing images).
This will require editing of the configuration file and setting up of a
server
block inside the http
block with two location
blocks.

First, create the /data/www directory and put an
index.html file with any text content into it and
create the /data/images directory and place some
images in it.

Next, open the configuration file.
The default configuration file already includes several examples of
the server block, mostly commented out.
For now comment out all such blocks and start a new
server block:

http {
    server {
    }
}

Generally, the configuration file may include several
server blocks
distinguished by ports on which
they listen to
and by
server names.
Once nginx decides which server processes a request,
it tests the URI specified in the request’s header against the parameters of the
location directives defined inside the
server block.

Add the following location block to the
server block:

location / {
    root /data/www;
}

This location block specifies the
“/” prefix compared with the URI from the request.
For matching requests, the URI will be added to the path specified in the
root
directive, that is, to /data/www,
to form the path to the requested file on the local file system.
If there are several matching location blocks nginx
selects the one with the longest prefix.
The location block above provides the shortest
prefix, of length one,
and so only if all other location
blocks fail to provide a match, this block will be used.

Next, add the second location block:

location /images/ {
    root /data;
}

It will be a match for requests starting with /images/
(location / also matches such requests,
but has shorter prefix).

The resulting configuration of the server block should
look like this:

server {
    location / {
        root /data/www;
    }

    location /images/ {
        root /data;
    }
}

This is already a working configuration of a server that listens
on the standard port 80 and is accessible on the local machine at
http://localhost/.
In response to requests with URIs starting with /images/,
the server will send files from the /data/images directory.
For example, in response to the
http://localhost/images/example.png request nginx will
send the /data/images/example.png file.
If such file does not exist, nginx will send a response
indicating the 404 error.
Requests with URIs not starting with /images/ will be
mapped onto the /data/www directory.
For example, in response to the
http://localhost/some/example.html request nginx will
send the /data/www/some/example.html file.

To apply the new configuration, start nginx if it is not yet started or
send the reload signal to the nginx’s master process,
by executing:

nginx -s reload

In case something does not work as expected, you may try to find out
the reason in access.log and
error.log files in the directory
/usr/local/nginx/logs or
/var/log/nginx.

Setting Up a Simple Proxy Server

One of the frequent uses of nginx is setting it up as a proxy server, which
means a server that receives requests, passes them to the proxied servers,
retrieves responses from them, and sends them to the clients.

We will configure a basic proxy server, which serves requests of
images with files from the local directory and sends all other requests to a
proxied server.
In this example, both servers will be defined on a single nginx instance.

First, define the proxied server by adding one more server
block to the nginx’s configuration file with the following contents:

server {
    listen 8080;
    root /data/up1;

    location / {
    }
}

This will be a simple server that listens on the port 8080
(previously, the listen directive has not been specified
since the standard port 80 was used) and maps
all requests to the /data/up1 directory on the local
file system.
Create this directory and put the index.html file into it.
Note that the root directive is placed in the
server context.
Such root directive is used when the
location block selected for serving a request does not
include its own root directive.

Next, use the server configuration from the previous section
and modify it to make it a proxy server configuration.
In the first location block, put the
proxy_pass
directive with the protocol, name and port of the proxied server specified
in the parameter (in our case, it is http://localhost:8080):

server {
    location / {
        proxy_pass http://localhost:8080;
    }

    location /images/ {
        root /data;
    }
}

We will modify the second location
block, which currently maps requests with the /images/
prefix to the files under the /data/images directory,
to make it match the requests of images with typical file extensions.
The modified location block looks like this:

location ~ \.(gif|jpg|png)$ {
    root /data/images;
}

The parameter is a regular expression matching all URIs ending
with .gif, .jpg, or .png.
A regular expression should be preceded with ~.
The corresponding requests will be mapped to the /data/images
directory.

When nginx selects a location block to serve a request
it first checks location
directives that specify prefixes, remembering location
with the longest prefix, and then checks regular expressions.
If there is a match with a regular expression, nginx picks this
location or, otherwise, it picks the one remembered earlier.

The resulting configuration of a proxy server will look like this:

server {
    location / {
        proxy_pass http://localhost:8080/;
    }

    location ~ \.(gif|jpg|png)$ {
        root /data/images;
    }
}

This server will filter requests ending with .gif,
.jpg, or .png
and map them to the /data/images directory (by adding URI to the
root directive’s parameter) and pass all other requests
to the proxied server configured above.

To apply new configuration, send the reload signal to
nginx as described in the previous sections.

There are many more
directives that may be used to further configure a proxy connection.

Setting Up FastCGI Proxying

nginx can be used to route requests to FastCGI servers which run
applications built with various frameworks and programming languages
such as PHP.

The most basic nginx configuration to work with a FastCGI server
includes using the
fastcgi_pass
directive instead of the proxy_pass directive,
and fastcgi_param
directives to set parameters passed to a FastCGI server.
Suppose the FastCGI server is accessible on localhost:9000.
Taking the proxy configuration from the previous section as a basis,
replace the proxy_pass directive with the
fastcgi_pass directive and change the parameter to
localhost:9000.
In PHP, the SCRIPT_FILENAME parameter is used for
determining the script name, and the QUERY_STRING
parameter is used to pass request parameters.
The resulting configuration would be:

server {
    location / {
        fastcgi_pass  localhost:9000;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_param QUERY_STRING    $query_string;
    }

    location ~ \.(gif|jpg|png)$ {
        root /data/images;
    }
}

This will set up a server that will route all requests except for
requests for static images to the proxied server operating on
localhost:9000 through the FastCGI protocol.


<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>Building nginx from Sources</title><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="stylesheet" href="../../css/style_en.css">

Planning your ingress-nginx migration? Start here:
kubernetes.nginx.org.

<input class="side-menu" type="checkbox" id="side-menu">

english

русский

news

about

download

security

documentation

faq

books

community

enterprise

community forum (new)

x.com

blog

njs

ingress controller

gateway fabric

Building nginx from Sources

The build is configured using the configure command.
It defines various aspects of the system, including the methods nginx
is allowed to use for connection processing.
At the end it creates a Makefile.

The configure command supports the following parameters:

--help

prints a help message.

--prefix=path

defines a directory that will keep server files.
This same directory will also be used for all relative paths set by
configure (except for paths to libraries sources)
and in the nginx.conf configuration file.
It is set to the /usr/local/nginx directory by default.

--sbin-path=path

sets the name of an nginx executable file.
This name is used only during installation.
By default the file is named
prefix/sbin/nginx.

--modules-path=path

defines a directory where nginx dynamic modules will be installed.
By default the prefix/modules directory is used.

--conf-path=path

sets the name of an nginx.conf configuration file.
If needs be, nginx can always be started with a different configuration file,
by specifying it in the command-line parameter
<nobr>-c file</nobr>.
By default the file is named
prefix/conf/nginx.conf.

--error-log-path=path

sets the name of the primary error, warnings, and diagnostic file.
After installation, the file name can always be changed in the
nginx.conf configuration file using the
error_log directive.
By default the file is named
prefix/logs/error.log.

--pid-path=path

sets the name of an nginx.pid file
that will store the process ID of the main process.
After installation, the file name can always be changed in the
nginx.conf configuration file using the
pid directive.
By default the file is named
prefix/logs/nginx.pid.

--lock-path=path

sets a prefix for the names of lock files.
After installation, the value can always be changed in the
nginx.conf configuration file using the
lock_file directive.
By default the value is
prefix/logs/nginx.lock.

--user=name

sets the name of an unprivileged user whose credentials will be used
by worker processes.
After installation, the name can always be changed in the
nginx.conf configuration file using the
user directive.
The default user name is nobody.

--group=name

sets the name of a group whose credentials will be used
by worker processes.
After installation, the name can always be changed in the
nginx.conf configuration file using the
user directive.
By default, a group name is set to the name of an unprivileged user.

--build=name

sets an optional nginx build name.

--builddir=path

sets a build directory.

--with-select_module

--without-select_module

enables or disables building a module that allows the server to work
with the select() method.
This module is built automatically if the platform does not appear
to support more appropriate methods such as kqueue, epoll, or /dev/poll.

--with-poll_module

--without-poll_module

enables or disables building a module that allows the server to work
with the poll() method.
This module is built automatically if the platform does not appear
to support more appropriate methods such as kqueue, epoll, or /dev/poll.

--with-threads

enables the use of
thread pools.

--with-file-aio

enables the use of
asynchronous file I/O
(AIO) on FreeBSD and Linux.

--with-http_ssl_module

enables building a module that adds the
HTTPS protocol support
to an HTTP server.
This module is not built by default.
The OpenSSL library is required to build and run this module.

--with-http_v2_module

enables building a module that provides support for
HTTP/2.
This module is not built by default.

--with-http_v3_module

enables building a module that provides support for
HTTP/3.
This module is not built by default.
The OpenSSL library that provides HTTP/3 support
is required to build and run this module.

--with-http_realip_module

enables building the
ngx_http_realip_module
module that changes the client address to the address
sent in the specified header field.
This module is not built by default.

--with-http_addition_module

enables building the
ngx_http_addition_module
module that adds text before and after a response.
This module is not built by default.

--with-http_xslt_module

--with-http_xslt_module=dynamic

enables building the
ngx_http_xslt_module
module that transforms XML responses using one or more XSLT stylesheets.
This module is not built by default.
The libxml2 and
libxslt libraries
are required to build and run this module.

--with-http_image_filter_module

--with-http_image_filter_module=dynamic

enables building the
ngx_http_image_filter_module
module that transforms images in JPEG, GIF, PNG, and WebP formats.
This module is not built by default.

--with-http_geoip_module

--with-http_geoip_module=dynamic

enables building the
ngx_http_geoip_module
module that creates variables depending on the client IP address
and the precompiled
MaxMind databases.
This module is not built by default.

--with-http_sub_module

enables building the
ngx_http_sub_module
module that modifies a response by replacing one specified string by another.
This module is not built by default.

--with-http_dav_module

enables building the
ngx_http_dav_module
module that provides file management automation via the WebDAV protocol.
This module is not built by default.

--with-http_flv_module

enables building the
ngx_http_flv_module
module that provides pseudo-streaming server-side support
for Flash Video (FLV) files.
This module is not built by default.

--with-http_mp4_module

enables building the
ngx_http_mp4_module
module that provides pseudo-streaming server-side support
for MP4 files.
This module is not built by default.

--with-http_gunzip_module

enables building the
ngx_http_gunzip_module
module that decompresses responses
with “Content-Encoding: gzip”
for clients that do not support “gzip” encoding method.
This module is not built by default.

--with-http_gzip_static_module

enables building the
ngx_http_gzip_static_module
module that enables sending precompressed files
with the “.gz” filename extension instead of regular files.
This module is not built by default.

--with-http_auth_request_module

enables building the
ngx_http_auth_request_module
module that implements client authorization
based on the result of a subrequest.
This module is not built by default.

--with-http_random_index_module

enables building the
ngx_http_random_index_module
module that processes requests
ending with the slash character (‘/’) and picks a random
file in a directory to serve as an index file.
This module is not built by default.

--with-http_secure_link_module

enables building the
ngx_http_secure_link_module
module.
This module is not built by default.

--with-http_degradation_module

enables building the
ngx_http_degradation_module module.
This module is not built by default.

--with-http_slice_module

enables building the
ngx_http_slice_module
module that splits a request into subrequests,
each returning a certain range of response.
The module provides more effective caching of big responses.
This module is not built by default.

--with-http_stub_status_module

enables building the
ngx_http_stub_status_module
module that provides access to basic status information.
This module is not built by default.

--without-http_charset_module

disables building the
ngx_http_charset_module
module that adds the specified charset to the
“Content-Type” response header field
and can additionally convert data from one charset to another.

--without-http_gzip_module

disables building a module
that compresses responses
of an HTTP server.
The zlib library is required to build and run this module.

--without-http_ssi_module

disables building the
ngx_http_ssi_module
module that processes SSI (Server Side Includes) commands in responses
passing through it.

--without-http_userid_module

disables building the
ngx_http_userid_module
module that sets cookies suitable for client identification.

--without-http_access_module

disables building the
ngx_http_access_module
module that allows limiting access to certain client addresses.

--without-http_auth_basic_module

disables building the
ngx_http_auth_basic_module
module that allows limiting access to resources by validating the user name
and password using the “HTTP Basic Authentication” protocol.

--without-http_mirror_module

disables building the
ngx_http_mirror_module
module that implements mirroring of an original request
by creating background mirror subrequests.

--without-http_autoindex_module

disables building the
ngx_http_autoindex_module
module that processes requests
ending with the slash character (‘/’) and produces
a directory listing in case the
ngx_http_index_module module
cannot find an index file.

--without-http_geo_module

disables building the
ngx_http_geo_module
module that creates variables
with values depending on the client IP address.

--without-http_map_module

disables building the
ngx_http_map_module
module that creates variables
with values depending on values of other variables.

--without-http_split_clients_module

disables building the
ngx_http_split_clients_module
module that creates variables for A/B testing.

--without-http_referer_module

disables building the
ngx_http_referer_module
module that can block access to a site for requests with invalid values
in the “Referer” header field.

--without-http_rewrite_module

disables building a module that allows an HTTP server to
redirect requests and change URI
of requests.
The PCRE library is required to build and run this module.

--without-http_proxy_module

disables building an HTTP server
proxying module.

--without-http_fastcgi_module

disables building the
ngx_http_fastcgi_module
module that passes requests to a FastCGI server.

--without-http_uwsgi_module

disables building the
ngx_http_uwsgi_module
module that passes requests to a uwsgi server.

--without-http_scgi_module

disables building the
ngx_http_scgi_module
module that passes requests to an SCGI server.

--without-http_grpc_module

disables building the
ngx_http_grpc_module
module that passes requests to a gRPC server.

--without-http_memcached_module

disables building the
ngx_http_memcached_module
module that obtains responses from a memcached server.

--without-http_limit_conn_module

disables building the
ngx_http_limit_conn_module
module that limits the number of connections per key, for example,
the number of connections from a single IP address.

--without-http_limit_req_module

disables building the
ngx_http_limit_req_module
module that limits the request processing rate per key, for example,
the processing rate of requests coming from a single IP address.

--without-http_empty_gif_module

disables building a module that
emits single-pixel
transparent GIF.

--without-http_browser_module

disables building the
ngx_http_browser_module
module that creates variables whose values depend on the value of the
“User-Agent” request header field.

--without-http_upstream_hash_module

disables building a module that implements the
hash
load balancing method.

--without-http_upstream_ip_hash_module

disables building a module that implements the
ip_hash
load balancing method.

--without-http_upstream_least_conn_module

disables building a module that implements the
least_conn
load balancing method.

--without-http_upstream_least_time_module

disables building a module that implements the
least_time
load balancing method.

--without-http_upstream_random_module

disables building a module that implements the
random
load balancing method.

--without-http_upstream_keepalive_module

disables building a module that provides
caching of
connections to upstream servers.

--without-http_upstream_zone_module

disables building a module that makes it possible to store run-time state
of an upstream group in a shared memory
zone.

--without-http_upstream_sticky_module

disables building a module that provides
session
affinity to upstream servers.

--with-http_perl_module

--with-http_perl_module=dynamic

enables building the
embedded Perl module.
This module is not built by default.

--with-perl_modules_path=path

defines a directory that will keep Perl modules.

--with-perl=path

sets the name of the Perl binary.

--http-log-path=path

sets the name of the primary request log file of the HTTP server.
After installation, the file name can always be changed in the
nginx.conf configuration file using the
access_log directive.
By default the file is named
prefix/logs/access.log.

--http-client-body-temp-path=path

defines a directory for storing temporary files
that hold client request bodies.
After installation, the directory can always be changed in the
nginx.conf configuration file using the
client_body_temp_path
directive.
By default the directory is named
prefix/client_body_temp.

--http-proxy-temp-path=path

defines a directory for storing temporary files
with data received from proxied servers.
After installation, the directory can always be changed in the
nginx.conf configuration file using the
proxy_temp_path
directive.
By default the directory is named
prefix/proxy_temp.

--http-fastcgi-temp-path=path

defines a directory for storing temporary files
with data received from FastCGI servers.
After installation, the directory can always be changed in the
nginx.conf configuration file using the
fastcgi_temp_path
directive.
By default the directory is named
prefix/fastcgi_temp.

--http-uwsgi-temp-path=path

defines a directory for storing temporary files
with data received from uwsgi servers.
After installation, the directory can always be changed in the
nginx.conf configuration file using the
uwsgi_temp_path
directive.
By default the directory is named
prefix/uwsgi_temp.

--http-scgi-temp-path=path

defines a directory for storing temporary files
with data received from SCGI servers.
After installation, the directory can always be changed in the
nginx.conf configuration file using the
scgi_temp_path
directive.
By default the directory is named
prefix/scgi_temp.

--without-http

disables the HTTP server.

--without-http-cache

disables HTTP cache.

--with-mail

--with-mail=dynamic

enables POP3/IMAP4/SMTP
mail proxy server.

--with-mail_ssl_module

enables building a module that adds the
SSL/TLS protocol support
to the mail proxy server.
This module is not built by default.
The OpenSSL library is required to build and run this module.

--without-mail_pop3_module

disables the POP3 protocol
in mail proxy server.

--without-mail_imap_module

disables the IMAP protocol
in mail proxy server.

--without-mail_smtp_module

disables the SMTP protocol
in mail proxy server.

--with-stream

--with-stream=dynamic

enables building the
stream module
for generic TCP/UDP proxying and load balancing.
This module is not built by default.

--with-stream_ssl_module

enables building a module that adds the
SSL/TLS protocol support
to the stream module.
This module is not built by default.
The OpenSSL library is required to build and run this module.

--with-stream_realip_module

enables building the
ngx_stream_realip_module
module that changes the client address to the address
sent in the PROXY protocol header.
This module is not built by default.

--with-stream_geoip_module

--with-stream_geoip_module=dynamic

enables building the
ngx_stream_geoip_module
module that creates variables depending on the client IP address
and the precompiled
MaxMind databases.
This module is not built by default.

--with-stream_ssl_preread_module

enables building the
ngx_stream_ssl_preread_module
module that allows extracting information from the
ClientHello
message without terminating SSL/TLS.
This module is not built by default.

--without-stream_limit_conn_module

disables building the
ngx_stream_limit_conn_module
module that limits the number of connections per key, for example,
the number of connections from a single IP address.

--without-stream_access_module

disables building the
ngx_stream_access_module
module that allows limiting access to certain client addresses.

--without-stream_geo_module

disables building the
ngx_stream_geo_module
module that creates variables
with values depending on the client IP address.

--without-stream_map_module

disables building the
ngx_stream_map_module
module that creates variables
with values depending on values of other variables.

--without-stream_split_clients_module

disables building the
ngx_stream_split_clients_module
module that creates variables for A/B testing.

--without-stream_return_module

disables building the
ngx_stream_return_module
module that sends some specified value to the client
and then closes the connection.

--without-stream_pass_module

disables building the
ngx_stream_pass_module
module that passes accepted connections to other listening sockets.

--without-stream_set_module

disables building the
ngx_stream_set_module
module that sets a value for a variable.

--without-stream_upstream_hash_module

disables building a module that implements the
hash
load balancing method.

--without-stream_upstream_least_conn_module

disables building a module that implements the
least_conn
load balancing method.

--without-stream_upstream_least_time_module

disables building a module that implements the
least_time
load balancing method.

--without-stream_upstream_random_module

disables building a module that implements the
random
load balancing method.

--without-stream_upstream_zone_module

disables building a module that makes it possible to store run-time state
of an upstream group in a shared memory
zone.

--with-google_perftools_module

enables building the
ngx_google_perftools_module
module that enables profiling of nginx worker processes using
Google Performance Tools.
The module is intended for nginx developers and is not built by default.

--with-cpp_test_module

enables building the
ngx_cpp_test_module module.

--add-module=path

enables an external module.

--add-dynamic-module=path

enables an external dynamic module.

--with-compat

enables dynamic modules compatibility.

--with-cc=path

sets the name of the C compiler.

--with-cpp=path

sets the name of the C preprocessor.

--with-cc-opt=parameters

sets additional parameters that will be added to the CFLAGS variable.
When using the system PCRE library under FreeBSD,
--with-cc-opt="-I /usr/local/include"
should be specified.
If the number of files supported by select() needs to be
increased it can also be specified here such as this:
--with-cc-opt="-D FD_SETSIZE=2048".

--with-ld-opt=parameters

sets additional parameters that will be used during linking.
When using the system PCRE library under FreeBSD,
--with-ld-opt="-L /usr/local/lib"
should be specified.

--with-cpu-opt=cpu

enables building per specified CPU:
pentium, pentiumpro,
pentium3, pentium4,
athlon, opteron,
sparc32, sparc64,
ppc64.

--without-pcre

disables the usage of the PCRE library.

--with-pcre

forces the usage of the PCRE library.

--with-pcre=path

sets the path to the sources of the PCRE library.
The library distribution needs to be downloaded from the
PCRE site and extracted.
The rest is done by nginx’s ./configure and
make.
The library is required for regular expressions support in the
location directive
and for the
ngx_http_rewrite_module
module.

--with-pcre-opt=parameters

sets additional build options for PCRE.

--with-pcre-jit

builds the PCRE library with
“just-in-time compilation” support (1.1.12, the
pcre_jit directive).

--without-pcre2

disables use of the PCRE2 library
instead of the original PCRE library (1.21.5).

--with-zlib=path

sets the path to the sources of the zlib library.
The library distribution needs to be downloaded from the
zlib site and extracted.
The rest is done by nginx’s ./configure and
make.
The library is required for the
ngx_http_gzip_module module.

--with-zlib-opt=parameters

sets additional build options for zlib.

--with-zlib-asm=cpu

enables the use of the zlib assembler sources optimized
for one of the specified CPUs:
pentium, pentiumpro.

--with-libatomic

forces the libatomic_ops library usage.

--with-libatomic=path

sets the path to the libatomic_ops library sources.

--with-openssl=path

sets the path to the OpenSSL library sources.

--with-openssl-opt=parameters

sets additional build options for OpenSSL.

--with-debug

enables the debugging log.

Example of parameters usage (all of this needs to be typed in one line):

./configure
    --sbin-path=/usr/local/nginx/nginx
    --conf-path=/usr/local/nginx/nginx.conf
    --pid-path=/usr/local/nginx/nginx.pid
    --with-http_ssl_module
    --with-pcre=../pcre2-10.39
    --with-zlib=../zlib-1.3

After configuration,
nginx is compiled and installed using make.


<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>Contributing Changes</title><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="stylesheet" href="../../css/style_en.css">

Planning your ingress-nginx migration? Start here:
kubernetes.nginx.org.

<input class="side-menu" type="checkbox" id="side-menu">

english

русский

news

about

download

security

documentation

faq

books

community

enterprise

community forum (new)

x.com

blog

njs

ingress controller

gateway fabric

Contributing Changes

Getting Sources
Formatting Changes
Before Submitting
Submitting Changes
Website
License

Getting Sources

GitHub is used
to store source code.
The repository can be cloned
with the following command:

git clone https://github.com/nginx/nginx.git

Formatting Changes

Changes should be formatted according to the
code style
used by nginx.
Sometimes, there is no clear rule; in such cases
examine how existing nginx sources are formatted and mimic this style.
Changes will more likely be accepted if style corresponds to the surrounding
code.

Commit
the changes in your nginx GitHub fork.
Please ensure that the specified
e-mail
address and real name of the author are correct.

The commit message should have a single-line synopsis followed by verbose
description after an empty line.
Limit the subject and commit message body lines to 72 characters.
The resulting commit can be obtained using the
git show command:

commit 067d766f210ee914b750d79d9284cbf8801058f3
Author: Zoey <username@example.com>
Date:   Sun Apr 5 11:31:15 2026 +0200

    Fix $request_port and $is_request_port in subrequests

    Closes #1247.

diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c
index 0c46106db..53ddf39bb 100644
--- a/src/http/ngx_http_core_module.c
+++ b/src/http/ngx_http_core_module.c
@@ -2453,6 +2453,8 @@ ngx_http_subrequest(ngx_http_request_t *r,
     sr->method = NGX_HTTP_GET;
     sr->http_version = r->http_version;

+    sr->port = r->port;
+
     sr->request_line = r->request_line;
     sr->uri = *uri;

Before Submitting

Several points are worth to consider before submitting changes:

The proposed changes should work properly on a wide range of
supported
platforms.

Try to make it clear why the suggested change is needed, and provide a use
case, if possible.

Passing your changes through the test suite is a good way to ensure
that they do not cause a regression.
The repository with
tests can be cloned with the following command:

git clone https://github.com/nginx/nginx-tests.git

Submitting Changes

The proposed changes should be submitted from your fork to
nginx repository
as a
pull request.

Website

GitHub is used to store the sources for this website.
The repository
can be cloned with the following command:

git clone https://github.com/nginx/nginx.org.git

Documentation changes should be submitted from your fork
as a pull request.

License

Submitting changes implies granting project a permission to use it under
an appropriate license.


<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>Controlling nginx</title><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="stylesheet" href="../../css/style_en.css">

Planning your ingress-nginx migration? Start here:
kubernetes.nginx.org.

<input class="side-menu" type="checkbox" id="side-menu">

english

русский

news

about

download

security

documentation

faq

books

community

enterprise

community forum (new)

x.com

blog

njs

ingress controller

gateway fabric

Controlling nginx

Changing Configuration
Rotating Log-files
Upgrading Executable on the Fly

nginx can be controlled with signals.
The process ID of the master process is written to the file
/usr/local/nginx/logs/nginx.pid by default.
This name may be changed at configuration time, or in
nginx.conf using the
pid
directive.
The master process supports the following signals:

TERM, INT	fast shutdown

QUIT	graceful shutdown

HUP	changing configuration,
keeping up with a changed time zone (only for FreeBSD and Linux),
starting new worker processes with a new configuration,
graceful shutdown of old worker processes

USR1	re-opening log files

USR2	upgrading an executable file

WINCH	graceful shutdown of worker processes

Individual worker processes can be controlled with signals as well,
though it is not required.
The supported signals are:

TERM, INT	fast shutdown

QUIT	graceful shutdown

USR1	re-opening log files

WINCH	abnormal termination for debugging
(requires debug_points to be enabled)

Changing Configuration

In order for nginx to re-read the configuration file, a HUP
signal should be sent to the master process.
The master process first checks the syntax validity, then tries
to apply new configuration, that is, to open log files and new
listen sockets.
If this fails, it rolls back changes and continues to work
with old configuration.
If this succeeds, it starts new worker processes, and
sends messages to old worker processes requesting them to
shut down gracefully.
Old worker processes close listen sockets and continue to service
old clients.
After all clients are serviced, old worker processes are shut down.

Let’s illustrate this by example.
Imagine that nginx is run on FreeBSD and the command

ps axw -o pid,ppid,user,%cpu,vsz,wchan,command | egrep '(nginx|PID)'

produces the following output:

  PID  PPID USER    %CPU   VSZ WCHAN  COMMAND
33126     1 root     0.0  1148 pause  nginx: master process /usr/local/nginx/sbin/nginx
33127 33126 nobody   0.0  1380 kqread nginx: worker process (nginx)
33128 33126 nobody   0.0  1364 kqread nginx: worker process (nginx)
33129 33126 nobody   0.0  1364 kqread nginx: worker process (nginx)

If HUP is sent to the master process, the output becomes:

  PID  PPID USER    %CPU   VSZ WCHAN  COMMAND
33126     1 root     0.0  1164 pause  nginx: master process /usr/local/nginx/sbin/nginx
33129 33126 nobody   0.0  1380 kqread nginx: worker process is shutting down (nginx)
33134 33126 nobody   0.0  1368 kqread nginx: worker process (nginx)
33135 33126 nobody   0.0  1368 kqread nginx: worker process (nginx)
33136 33126 nobody   0.0  1368 kqread nginx: worker process (nginx)

One of the old worker processes with PID 33129 still continues to work.
After some time it exits:

  PID  PPID USER    %CPU   VSZ WCHAN  COMMAND
33126     1 root     0.0  1164 pause  nginx: master process /usr/local/nginx/sbin/nginx
33134 33126 nobody   0.0  1368 kqread nginx: worker process (nginx)
33135 33126 nobody   0.0  1368 kqread nginx: worker process (nginx)
33136 33126 nobody   0.0  1368 kqread nginx: worker process (nginx)

Rotating Log-files

In order to rotate log files, they need to be renamed first.
After that USR1 signal should be sent to the master process.
The master process will then re-open all currently open log files and
assign them an unprivileged user under which the worker processes
are running, as an owner.
After successful re-opening, the master process closes all open files and
sends the message to worker process to ask them to re-open files.
Worker processes also open new files and close old files right away.
As a result, old files are almost immediately available for post
processing, such as compression.

Upgrading Executable on the Fly

In order to upgrade the server executable, the new executable file
should be put in place of an old file first.
After that USR2 signal should be sent to the master process.
The master process first renames its file with the process ID to a
new file with the .oldbin suffix, e.g.
/usr/local/nginx/logs/nginx.pid.oldbin,
then starts a new executable file that in turn starts new
worker processes:

  PID  PPID USER    %CPU   VSZ WCHAN  COMMAND
33126     1 root     0.0  1164 pause  nginx: master process /usr/local/nginx/sbin/nginx
33134 33126 nobody   0.0  1368 kqread nginx: worker process (nginx)
33135 33126 nobody   0.0  1380 kqread nginx: worker process (nginx)
33136 33126 nobody   0.0  1368 kqread nginx: worker process (nginx)
36264 33126 root     0.0  1148 pause  nginx: master process /usr/local/nginx/sbin/nginx
36265 36264 nobody   0.0  1364 kqread nginx: worker process (nginx)
36266 36264 nobody   0.0  1364 kqread nginx: worker process (nginx)
36267 36264 nobody   0.0  1364 kqread nginx: worker process (nginx)

After that all worker processes (old and new ones) continue to accept requests.
If the WINCH signal is sent to the first master process, it will
send messages to its worker processes, requesting them to shut
down gracefully, and they will start to exit:

  PID  PPID USER    %CPU   VSZ WCHAN  COMMAND
33126     1 root     0.0  1164 pause  nginx: master process /usr/local/nginx/sbin/nginx
33135 33126 nobody   0.0  1380 kqread nginx: worker process is shutting down (nginx)
36264 33126 root     0.0  1148 pause  nginx: master process /usr/local/nginx/sbin/nginx
36265 36264 nobody   0.0  1364 kqread nginx: worker process (nginx)
36266 36264 nobody   0.0  1364 kqread nginx: worker process (nginx)
36267 36264 nobody   0.0  1364 kqread nginx: worker process (nginx)

After some time, only the new worker processes will process requests:

  PID  PPID USER    %CPU   VSZ WCHAN  COMMAND
33126     1 root     0.0  1164 pause  nginx: master process /usr/local/nginx/sbin/nginx
36264 33126 root     0.0  1148 pause  nginx: master process /usr/local/nginx/sbin/nginx
36265 36264 nobody   0.0  1364 kqread nginx: worker process (nginx)
36266 36264 nobody   0.0  1364 kqread nginx: worker process (nginx)
36267 36264 nobody   0.0  1364 kqread nginx: worker process (nginx)

It should be noted that the old master process does not close its listen
sockets, and it can be managed to start its worker processes again if needed.
If for some reason the new executable file works unacceptably, one of the
following can be done:

Send the HUP signal to the old master process.
The old master process will start new worker processes
without re-reading the configuration.
After that, all new processes can be shut down gracefully,
by sending the QUIT signal to the new master process.

Send the TERM signal to the new master process.
It will then send a message to its worker processes requesting them
to exit immediately, and they will all exit almost immediately.
(If new processes do not exit for some reason,
the KILL signal should be sent to them to force them to exit.)
When the new master process exits, the old master process will start new
worker processes automatically.

If the new master process exits then the old master process discards
the .oldbin suffix from the file name with the process ID.

If upgrade was successful, then the QUIT signal should be sent to
the old master process, and only new processes will stay:

  PID  PPID USER    %CPU   VSZ WCHAN  COMMAND
36264     1 root     0.0  1148 pause  nginx: master process /usr/local/nginx/sbin/nginx
36265 36264 nobody   0.0  1364 kqread nginx: worker process (nginx)
36266 36264 nobody   0.0  1364 kqread nginx: worker process (nginx)
36267 36264 nobody   0.0  1364 kqread nginx: worker process (nginx)


<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>A debugging log</title><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="stylesheet" href="../../css/style_en.css">

Planning your ingress-nginx migration? Start here:
kubernetes.nginx.org.

<input class="side-menu" type="checkbox" id="side-menu">

english

русский

news

about

download

security

documentation

faq

books

community

enterprise

community forum (new)

x.com

blog

njs

ingress controller

gateway fabric

A debugging log

Debugging log for selected clients
Logging to a cyclic memory buffer

To enable a debugging log, nginx needs to be configured to support
debugging during the build:

./configure --with-debug ...

Then the debug level should be set with the
error_log directive:

error_log /path/to/log debug;

To verify that nginx is configured to support debugging,
run the nginx -V command:

configure arguments: --with-debug ...

Pre-built Linux packages
provide out-of-the-box support for debugging log with
the nginx-debug binary (1.9.8)
which can be run using commands

service nginx stop
service nginx-debug start

and then set the debug level.
The nginx binary version for Windows is always built with the debugging log
support, so only setting the debug level will suffice.

Note that redefining the log without also specifying the
debug
level will disable the debugging log.
In the example below, redefining the log on the
server
level disables the debugging log for this server:

error_log /path/to/log debug;

http {
    server {
        error_log /path/to/log;
        ...

To avoid this, either the line redefining the log should be
commented out, or the debug level specification should
also be added:

error_log /path/to/log debug;

http {
    server {
        error_log /path/to/log debug;
        ...

Debugging log for selected clients

It is also possible to enable the debugging log for
selected
client addresses only:

error_log /path/to/log;

events {
    debug_connection 192.168.1.1;
    debug_connection 192.168.10.0/24;
}

Logging to a cyclic memory buffer

The debugging log can be written to a cyclic memory buffer:

error_log memory:32m debug;

Logging to the memory buffer on the debug level
does not have significant impact on performance even under high load.
In this case, the log can be extracted using
a gdb script like the following one:

set $log = ngx_cycle->log

while $log->writer != ngx_log_memory_writer
    set $log = $log->next
end

set $buf = (ngx_log_memory_buf_t *) $log->wdata
dump binary memory debug_log.txt $buf->start $buf->end

Or using an lldb script as follows:

expr ngx_log_t *$log = ngx_cycle->log
expr while ($log->writer != ngx_log_memory_writer) { $log = $log->next; }
expr ngx_log_memory_buf_t *$buf = (ngx_log_memory_buf_t *) $log->wdata
memory read --force --outfile debug_log.txt --binary $buf->start $buf->end