File tree 1 file changed +38
-10
lines changed
1 file changed +38
-10
lines changed Original file line number Diff line number Diff line change @@ -5,16 +5,6 @@ map $http_upgrade $connection_upgrade {
5
5
6
6
proxy_cache_path /var/cache/nginx-noeldemartin levels=1:2 keys_zone=CACHE-NOELDEMARTIN:10m inactive=7d max_size=1g;
7
7
8
- server {
9
- listen 80;
10
- listen [::]:80;
11
- server_name noeldemartin.com;
12
- server_tokens off;
13
- root /var/www/noeldemartin/public;
14
- location /.well-known/acme-challenge/ { allow all; }
15
- location / { return 301 https://$host$request_uri; }
16
- }
17
-
18
8
server {
19
9
listen 443 ssl http2;
20
10
listen [::]:443 ssl http2;
@@ -85,6 +75,44 @@ server {
85
75
86
76
}
87
77
78
+ ## http:// redirect
79
+
80
+ server {
81
+ listen 80;
82
+ listen [::]:80;
83
+ server_name noeldemartin.com;
84
+ server_tokens off;
85
+ root /var/www/noeldemartin/public;
86
+ location /.well-known/acme-challenge/ { allow all; }
87
+ location / { return 301 https://$host$request_uri; }
88
+ }
89
+
90
+ ## www. redirect
91
+
92
+ server {
93
+ listen 80;
94
+ listen [::]:80;
95
+ server_name www.noeldemartin.com;
96
+ server_tokens off;
97
+ location / { return 301 https://noeldemartin.com$request_uri; }
98
+ }
99
+
100
+ server {
101
+ listen 443 ssl;
102
+ listen [::]:443 ssl;
103
+ server_name www.noeldemartin.com;
104
+ server_tokens off;
105
+
106
+ ssl_certificate /etc/letsencrypt/live/www.noeldemartin.com/fullchain.pem;
107
+ ssl_certificate_key /etc/letsencrypt/live/www.noeldemartin.com/privkey.pem;
108
+ ssl_protocols TLSv1.2;
109
+ ssl_ciphers HIGH:!MEDIUM:!LOW:!aNULL:!NULL:!SHA;
110
+ ssl_prefer_server_ciphers on;
111
+ ssl_session_cache shared:SSL:10m;
112
+
113
+ location / { return 301 https://noeldemartin.com$request_uri; }
114
+ }
115
+
88
116
## learn.noeldemartin.social redirect
89
117
90
118
server {
You can’t perform that action at this time.
0 commit comments