summaryrefslogtreecommitdiff
path: root/roles/home/files
diff options
context:
space:
mode:
authorDmitry Ilvokhin <d@ilvokhin.com>2024-01-13 17:38:13 +0000
committerDmitry Ilvokhin <d@ilvokhin.com>2024-01-13 17:38:13 +0000
commit25d355fdc48e1630d7847d7238b1dd49f2e618a4 (patch)
tree441c31b25c678cd2865ba89bb1b874a83060620b /roles/home/files
parent2c04195a35fb2a425abfd0c6f0ce218176ed711e (diff)
downloadinfra-25d355fdc48e1630d7847d7238b1dd49f2e618a4.tar.gz
infra-25d355fdc48e1630d7847d7238b1dd49f2e618a4.tar.bz2
infra-25d355fdc48e1630d7847d7238b1dd49f2e618a4.zip
Add role for ilvokhin.com
Diffstat (limited to 'roles/home/files')
-rw-r--r--roles/home/files/ilvokhin.com33
1 files changed, 33 insertions, 0 deletions
diff --git a/roles/home/files/ilvokhin.com b/roles/home/files/ilvokhin.com
new file mode 100644
index 0000000..f1fafbf
--- /dev/null
+++ b/roles/home/files/ilvokhin.com
@@ -0,0 +1,33 @@
+server {
+ server_name ilvokhin.com www.ilvokhin.com;
+
+ root /srv/http/ilvokhin.com;
+ index index.html;
+
+ location / {
+ try_files $uri $uri/ = 404;
+ }
+
+ listen [::]:443 ssl;
+ listen 443 ssl;
+
+ ssl_certificate /etc/letsencrypt/live/ilvokhin.com/fullchain.pem;
+ ssl_certificate_key /etc/letsencrypt/live/ilvokhin.com/privkey.pem;
+}
+
+server {
+ if ($host = www.ilvokhin.com) {
+ return 301 https://$host$request_uri;
+ }
+
+ if ($host = ilvokhin.com) {
+ return 301 https://$host$request_uri;
+ }
+
+ server_name ilvokhin.com www.ilvokhin.com;
+
+ listen 80;
+ listen [::]:80;
+
+ return 404;
+}