update from sparkleup

This commit is contained in:
Madison Scott-Clary 2022-06-15 16:00:18 -07:00
parent ef52104760
commit 7851272b11
1 changed files with 5 additions and 4 deletions

View File

@ -23,11 +23,11 @@ As stated previously, this tutorial assumes that Jenkins is already installed. <
<h2 id="step-1-configure-nginx">Step 1 — Configure Nginx</h2>
<p>Nginx has become a favorite web server for its speed and flexibility in recent years, which makes it an idea choice for our application.</p>
<h3 id="edit-the-configuration">Edit the Configuration</h3>
<p>Next you will need to edit the default Nginx configuration file.</p>
<div class="codehilite"><pre><span></span><code>sudo nano /etc/nginx/sites-enabled/default
<p>Next you will need to edit the default Nginx configuration file. The following example uses <code>nano</code>.</p>
<div class="codehilite"><pre><span></span><code>sudo nano etc/nginx/sites-enabled/default
</code></pre></div>
<p>Here is what the final configuration might look like; the sections are broken down and briefly explained below. You can update or replace the existing config file, although you may want to make a quick copy first.</p>
<p>Here is what the final configuration might look like; the sections are broken down and briefly explained below. You can update or replace the existing config file, although you may want to make a backup copy first.</p>
<div class="codehilite"><pre><span></span><code><span class="k">server</span><span class="w"> </span><span class="p">{</span><span class="kn">23</span><span class="w"></span>
<span class="w"> </span><span class="s">listen</span><span class="w"> </span><span class="mi">80</span><span class="p">;</span><span class="w"></span>
<span class="w"> </span><span class="kn">return</span><span class="w"> </span><span class="mi">301</span><span class="w"> </span><span class="s">https://</span><span class="nv">$host$request_uri</span><span class="p">;</span><span class="w"></span>
@ -58,6 +58,7 @@ As stated previously, this tutorial assumes that Jenkins is already installed. <
</code></pre></div>
<p>You will need to update the &lt;^&gt;server_name&lt;^&gt; and <code>proxy_redirect</code> lines with your own domain name. There is some additional Nginx magic going on as well that tells requests to be read by Nginx and rewritten on the response side to ensure the reverse proxy is working.</p>
<p>Save and close the file. If you used <code>nano</code>, you can do so by pressing <code>Ctrl + X</code>, <code>Y</code>, and then <code>Enter</code>.</p>
<p>The first section tells the Nginx server to listen to any requests that come in on port 80 (default HTTP) and redirect them to HTTPS.</p>
<div class="codehilite"><pre><span></span><code><span class="k">...</span><span class="w"></span>
<span class="s">server</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
@ -115,7 +116,7 @@ sudo service nginx restart
<p>The only thing left to do is verify that everything worked correctly. As mentioned above, you should now be able to browse to your newly configured URL - &lt;^&gt;jenkins.domain.com&lt;^&gt; - over either HTTP or HTTPS. You should be redirected to the secure site, and should see some site information, including your newly updated SSL settings. As noted previously, if you are not using hostnames via DNS, then your redirection may not work as desired. In that case, you will need to modify the &lt;^&gt;proxy_pass&lt;^&gt; section in the Nginx config file.</p>
</article>
<footer>
<p>Page generated on 2022-06-14</p>
<p>Page generated on 2022-06-15</p>
</footer>
</main>
<script type="text/javascript">