0% found this document useful (0 votes)
15 views1 page

Nginx Site Management Cheatsheet

Uploaded by

waqif
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views1 page

Nginx Site Management Cheatsheet

Uploaded by

waqif
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

Quick Cheatsheet for Managing Nginx Sites

Task Command
List ALL available sites ls /etc/nginx/sites-available
List ONLY enabled sites ls /etc/nginx/sites-enabled
Enable a site sudo ln -s /etc/nginx/sites-available/your-
site /etc/nginx/sites-enabled/
Disable a site sudo rm /etc/nginx/sites-enabled/your-site
Test your Nginx configuration sudo nginx -t
Reload Nginx (apply changes) sudo systemctl reload nginx
See ALL loaded configs sudo nginx -T

--------------------------into the directory of sites--------------------------


sudo nano /etc/nginx/sites-available/[Link]

----------------enabled new sites - or create symbolic


link---------------------------
sudo ln -s /etc/nginx/sites-available/[Link] /etc/nginx/sites-enabled/

---------------Test ngnx-------------
sudo nginx -t

---------------restart nginx---------
sudo systemctl restart nginx

-----------SSL certification configuration--------------

1) sudo apt install certbot python3-certbot-nginx -y


2)sudo certbot --nginx -d [Link] -d [Link]

You might also like