Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
development:deploy:nginx:vue [2021/07/06 09:31] kalenpw created |
development:deploy:nginx:vue [2021/07/06 09:45] (current) kalenpw |
||
---|---|---|---|
Line 2: | Line 2: | ||
<code nginx> | <code nginx> | ||
server { | server { | ||
- | | + | listen 443 http2 ssl; |
- | | + | |
- | server_name | + | server_name kalen.pw; |
- | | + | access_log / |
+ | |||
root / | root / | ||
- | index index.php | + | index index.html; |
+ | ssl_certificate / | ||
+ | ssl_certificate_key / | ||
- | location | + | location |
- | | + | |
- | | + | root /web/kalen.pw; |
+ | } | ||
+ | location /img { | ||
+ | | ||
+ | root /web/kalen.pw; | ||
} | } | ||
- | | + | |
- | | + | if (!-e $request_filename) { |
- | | + | rewrite ^ / permanent; |
- | | + | } |
+ | | ||
+ | } | ||
- | #if ($scheme != " | + | server |
- | | + | |
- | #} # managed by Certbot | + | server_name www.kalen.pw; |
+ | | ||
} | } | ||
+ | |||
+ | server { | ||
+ | if ($host = www.kalen.pw) { | ||
+ | return 301 https:// | ||
+ | } # managed by Certbot | ||
+ | |||
+ | |||
+ | if ($host = kalen.pw) { | ||
+ | return 301 https:// | ||
+ | } # managed by Certbot | ||
+ | |||
+ | |||
+ | if ($host = www.kalenpw.com) { | ||
+ | return 301 https:// | ||
+ | } # managed by Certbot | ||
+ | |||
+ | |||
+ | if ($host = kalenpw.com) { | ||
+ | return 301 https:// | ||
+ | } # managed by Certbot | ||
+ | |||
+ | |||
+ | listen 80; | ||
+ | |||
+ | server_name www.kalen.pw kalen.pw; | ||
+ | return 404; # managed by Certbot | ||
+ | } | ||
+ | |||
</ | </ | ||
---- | ---- |