Forward http(s)?://www.domainname.tld to https://domainname.tld
This commit is contained in:
parent
7b8b75c427
commit
cc3615ad8c
1 changed files with 17 additions and 8 deletions
|
@ -1,18 +1,27 @@
|
|||
# LARAVEL CONFIGURATION
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name REPLACEME.TLD;
|
||||
return 301 https://REPLACEME.TLD$request_uri;
|
||||
listen 80;
|
||||
server_name REPLACEME.TLD www.REPLACEME.TLD;
|
||||
return 301 https://REPLACEME.TLD$request_uri;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443 ssl;
|
||||
server_name REPLACEME.TLD;
|
||||
root /srv/http/REPLACEME.TLD/public;
|
||||
listen 443 ssl;
|
||||
server_name www.REPLACEME.TLD;
|
||||
ssl_certificate /etc/letsencrypt/live/REPLACEME.TLD/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/REPLACEME.TLD/privkey.pem;
|
||||
ssl_trusted_certificate /etc/letsencrypt/live/REPLACEME.TLD/fullchain.pem;
|
||||
return 301 https://REPLACEME.TLD$request_uri;
|
||||
}
|
||||
|
||||
ssl_certificate /etc/letsencrypt/live/REPLACEME.TLD/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/REPLACEME.TLD/privkey.pem;
|
||||
server {
|
||||
listen 443 ssl;
|
||||
server_name REPLACEME.TLD;
|
||||
root /srv/http/REPLACEME.TLD/public;
|
||||
|
||||
ssl_certificate /etc/letsencrypt/live/REPLACEME.TLD/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/REPLACEME.TLD/privkey.pem;
|
||||
ssl_trusted_certificate /etc/letsencrypt/live/REPLACEME.TLD/fullchain.pem;
|
||||
|
||||
ssl_session_timeout 1d;
|
||||
|
|
Loading…
Reference in a new issue