You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
79 lines
3.0 KiB
HTML
79 lines
3.0 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<meta name="description" content="A guide to installing an NGINX web server">
|
|
<meta name="keywords" content="Blog, articles, news, NGINX, web server, guide">
|
|
<meta name="author" content="Nathan (Aney) Steel">
|
|
<meta name="theme-color" content="white">
|
|
<meta name="theme-color" content="black">
|
|
<link rel="stylesheet" type="text/css" href="/main.css">
|
|
<link rel="icon" type="image/png" href="/images/favicon.svg">
|
|
<title>How to install an NGINX web server</title>
|
|
</head>
|
|
|
|
<body>
|
|
<header>
|
|
<h1>How to install an NGINX web server</h1>
|
|
<input id="burger-toggle" type="checkbox"/>
|
|
<label class="burger-container" for="burger-toggle"><div class="burger"></div></label>
|
|
<hr/>
|
|
<nav>
|
|
<a href="/">home</a>
|
|
<a href="/equipment.html">equipment</a>
|
|
<a href="/projects.html">projects</a>
|
|
<a href="/blog/">blog</a>
|
|
<a href="/sitemap.html">misc</a>
|
|
<a href="/support.html">support</a>
|
|
</nav>
|
|
<hr/>
|
|
</header>
|
|
|
|
<main>
|
|
<section>
|
|
<p>NGINX (engine X) is one of the top webservers. It has relatively easy learning curve, is fast, and <a href="">secure</a>. It's a great step into web hosting, and a good first service for many servers.</p>
|
|
<h2>Install</h2>
|
|
<pre><code>sudo apt install nginx</code></pre>
|
|
|
|
<h2>Enable, and start</h2>
|
|
<pre><code>sudo systemctl enable nginx --now</code></pre>
|
|
<p>or</p>
|
|
<pre>
|
|
<code>sudo systemctl enable nginx
|
|
sudo systemctl start nginx</code></pre>
|
|
|
|
<h2>Enable the http port</h2>
|
|
<p>If you have UFW installed ala the <a href="/guides/initial-server-setup.html">initial server setup</a> guide you'll need to open the http port on the server</p>
|
|
<pre><code>sudo ufw allow 80</code></pre>
|
|
<p>or</p>
|
|
<pre><code>sudo ufw allow http</code></pre>
|
|
|
|
<h2>Check it's working</h2>
|
|
<p>Open your browser, and head over to your IP address, or domain name. With any luck you should see the default NGINX page, with a "Welcome to NGINX"</p>
|
|
|
|
<h3>Basic checks in case it's not</h3>
|
|
<p>Check nginx is actually running</p>
|
|
<pre><code>sudo systemctl status nginx</code></pre>
|
|
<p>In the active section, this should show "Active", if not try starting nginx again</p>
|
|
<pre><code>sudo systemctl start nginx</code></pre>
|
|
<p>Check UFW port is enabled<p>
|
|
<pre><code>sudo ufw status</code></pre>
|
|
<p>This should show port 80, and 80 (v6) with ALLOW. If not, run ufw allow again</p>
|
|
|
|
</section>
|
|
|
|
<section>
|
|
<h2>Next...</h2>
|
|
<p><a href="/guides/setup-nginx-website.html">Setup an nginx website</a></p>
|
|
</section>
|
|
</main>
|
|
|
|
<footer>
|
|
<hr/>
|
|
<p>Written by <a href="http://aney.co.uk" target="_blank" rel="noopener">@aney</a> with <a href="https://danluu.com/web-bloat/" target="_blank" rel="noopener">web bloat</a> in mind | <a href="https://github.com/Aney/website" target="_blank" rel="noopener">Source Code</a></p>
|
|
</footer>
|
|
</body>
|
|
</html>
|
|
|