File tree Expand file tree Collapse file tree 2 files changed +37
-0
lines changed
etc/nginx/sites-available Expand file tree Collapse file tree 2 files changed +37
-0
lines changed Original file line number Diff line number Diff line change 1818 /var/www
1919
2020 Server Configuration File Directory:
21+ /etc/nginx/sites-available
22+
23+ Server Configuration Symbolic Link Directory:
2124 /etc/nginx/sites-enabled
2225
2326 TLS/SSL Certificate & Key Directory:
Original file line number Diff line number Diff line change 1+ server {
2+
3+ # Standard Directives
4+ listen 443 ssl http2;
5+ listen [::]:443 ssl http2;
6+ server_name _;
7+ root /var/www/Nginx-Example;
8+ index index.html;
9+ keepalive_timeout 70;
10+
11+ # TLS Directives
12+ add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
13+ ssl_protocols TLSv1.2 TLSv1.3;
14+ ssl_certificate /etc/nginx/ssl/_.crt;
15+ ssl_certificate_key /etc/nginx/ssl/_.key;
16+ ssl_prefer_server_ciphers on;
17+ ssl_ciphers HIGH:!aNULL:!MD5;
18+ ssl_dhparam /etc/nginx/ssl/dhparam.pem;
19+ ssl_session_cache shared:SSL:10m;
20+ ssl_session_timeout 1h;
21+
22+ # 404 error if server cant't find files in root
23+ location / {
24+ try_files $uri $uri/ =404;
25+ }
26+ }
27+
28+ # Redirect from Port 80
29+ server {
30+ listen 80;
31+ listen [::]:80;
32+ server_name _;
33+ return 301 https://$server_name$request_uri;
34+ }
You can’t perform that action at this time.
0 commit comments