diff options
| author | Jack Jamison <jackqjamison@gmail.com> | 2025-07-18 14:23:05 -0400 |
|---|---|---|
| committer | Jack Jamison <jackqjamison@gmail.com> | 2025-07-18 14:23:05 -0400 |
| commit | bd60a5cf3bed2a5c9f9981a41cb88d2e1e79be20 (patch) | |
| tree | 658e9fbc8da352a8de1a810413cbd64f0e2a67f5 /nginx/homepage.conf | |
| parent | 9baa502c65c5dc716daafcbba60610bf238264bf (diff) | |
better https redirect
Diffstat (limited to 'nginx/homepage.conf')
| -rw-r--r-- | nginx/homepage.conf | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/nginx/homepage.conf b/nginx/homepage.conf index f5ad47d..f5784ab 100644 --- a/nginx/homepage.conf +++ b/nginx/homepage.conf @@ -1,6 +1,6 @@ # https server server { - server_name jackjamison.net ; + server_name jackjamison.net www.jackjamison.net ; location / { root /var/www/homepage; @@ -19,13 +19,9 @@ server { # http redirect server { - if ($host = jackjamison.net) { - return 301 https://$host$request_uri; - } # managed by Certbot - listen 80 ; listen [::]:80 ; - server_name jackjamison.net ; + server_name jackjamison.net www.jackjamison.net ; - return 404; # managed by Certbot -}
\ No newline at end of file + return 301 https://$host$request_uri; +} |
