feat: configure SSL and HTTP to HTTPS redirection in Nginx configuration
All checks were successful
Deploy Beta (NATIVE) / deploy (push) Successful in 27s
All checks were successful
Deploy Beta (NATIVE) / deploy (push) Successful in 27s
This commit is contained in:
parent
9fc5d3813b
commit
101d6610ff
1 changed files with 18 additions and 1 deletions
|
|
@ -1,5 +1,4 @@
|
|||
server {
|
||||
listen 80;
|
||||
server_name betaapicsa.tradhox.com apicsa.tradhox.com;
|
||||
|
||||
location / {
|
||||
|
|
@ -21,4 +20,22 @@ server {
|
|||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
|
||||
listen 443 ssl; # managed by Certbot
|
||||
ssl_certificate /etc/letsencrypt/live/betaapicsa.tradhox.com/fullchain.pem; # managed by Certbot
|
||||
ssl_certificate_key /etc/letsencrypt/live/betaapicsa.tradhox.com/privkey.pem; # managed by Certbot
|
||||
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
|
||||
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
|
||||
}
|
||||
|
||||
server {
|
||||
if ($host = apicsa.tradhox.com) {
|
||||
return 301 https://$host$request_uri;
|
||||
}
|
||||
if ($host = betaapicsa.tradhox.com) {
|
||||
return 301 https://$host$request_uri;
|
||||
}
|
||||
listen 80;
|
||||
server_name betaapicsa.tradhox.com apicsa.tradhox.com;
|
||||
return 404;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue