File tree Expand file tree Collapse file tree 1 file changed +16
-6
lines changed
Expand file tree Collapse file tree 1 file changed +16
-6
lines changed Original file line number Diff line number Diff line change @@ -2,28 +2,38 @@ server {
22 listen 80;
33 listen [::]:80;
44
5- server_name $FRONTEND_SERVER_NAME;
5+ server_name $FRONTEND_SERVER_NAME www.$FRONTEND_SERVER_NAME;
6+ server_tokens off;
67
78 location /.well-known/acme-challenge/ {
89 root /var/www/certbot;
910 }
1011
11- return 301 https://$FRONTEND_SERVER_NAME;
12+
13+ location / {
14+ return 301 https://$FRONTEND_SERVER_NAME$request_uri;
15+ }
1216}
1317
1418server {
1519 listen 80;
1620 listen [::]:80;
1721
18- server_name $BACKEND_SERVER_NAME;
22+ server_name $BACKEND_SERVER_NAME www.$BACKEND_SERVER_NAME;
23+ server_tokens off;
24+
1925
2026 location /.well-known/acme-challenge/ {
2127 root /var/www/certbot;
2228 }
23-
24- return 301 https://$BACKEND_SERVER_NAME;
29+
30+
31+ location / {
32+ return 301 https://$BACKEND_SERVER_NAME$request_uri;
33+ }
2534}
2635
36+
2737server {
2838 listen 443 ssl http2;
2939 server_name $FRONTEND_SERVER_NAME;
@@ -61,4 +71,4 @@ server {
6171 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
6272 proxy_set_header X-Forwarded-Proto $scheme;
6373 }
64- }
74+ }
You can’t perform that action at this time.
0 commit comments