Nginx
HomeTech JournalsPersonal ProjectsSysadmin Wiki
  • Nginx
  • Subsection
    • Updated Certbot Guide
    • Subdomain Config
    • Reverse Proxy Config
    • Load Balancing
Powered by GitBook
On this page
  • Documentation
  • Installation
  • Testing and Restart Nginx

Nginx

NextUpdated Certbot Guide

Last updated 2 years ago

Documentation

Installation

  1. apt-get install nginx

  2. sudo unlink /etc/nginx/sites/enabled/default - This makes it so the default config won't be used anymore

  3. cd /etc/nginx/sites-available/

* sites-available is where you put configs that can be used for later

4. sudo nano {name}.conf - This will create the new config file

5. Make config. Config references can be down under the Subsections tab

6. ln -s /etc/nginx/sites-available/{name}.conf /etc/nginx/sites-enabled/{name}.conf - This will enable the Nginx config

Testing and Restart Nginx

  • nginx -t -c /etc/nginx/{name}.conf - This will test the config file

  • systemctl restart nginx - Will restart the Nginx service and enable the config in sites-enabled

nginx documentation
Nginx Config Documentation
NGINX Documentationnginx
Product Documentation
Logo
Logo