File tree Expand file tree Collapse file tree 2 files changed +46
-1
lines changed
Expand file tree Collapse file tree 2 files changed +46
-1
lines changed Original file line number Diff line number Diff line change 1- # Nginx-Example
1+ # Nginx-Example
2+
3+ A tutorial for hosting static websites with Ubuntu & Nginx.
4+
5+ [ ![ Static Website Hosting with Nginx] ( logo.png )] ( https://www.youtube.com/watch?v=OHMWGj6D01U )
6+
7+ ## Installing/Uninstalling Nginx
8+
9+ To install Nginx type the following command into your terminal:
10+ sudo apt install nginx
11+
12+ To remove Nginx type the following command into your terminal:
13+ sudo apt remove nginx
14+
15+ ## Directories
16+
17+ Website Root Directory:
18+ /var/www
19+
20+ Server Configuration File Directory:
21+ /etc/nginx/sites-enabled
22+
23+ TLS/SSL Certificate & Key Directory:
24+ /etc/nginx/ssl
25+
26+ ## Administrative Commands
27+
28+ Starting the Server:
29+ sudo service nginx start
30+
31+ Stopping the Server:
32+ sudo service nginx stop
33+
34+ Restarting the Server:
35+ sudo service nginx restart
36+
37+ Checking the Server Status:
38+ sudo service nginx status
39+
40+ ## Certificate & Key Generation Commands
41+
42+ Generate Certificate & Private Key:
43+ sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout domainName.key -out domainName.crt
44+
45+ Generate PEM File Certificate (For Secure Email Messaging):
46+ sudo openssl dhparam -out dhparam.pem 2048
You can’t perform that action at this time.
0 commit comments