aboutsummaryrefslogtreecommitdiff
path: root/data/nextcloud
diff options
context:
space:
mode:
authorSam Chudnick <sam@chudnick.com>2023-06-25 09:52:36 -0400
committerSam Chudnick <sam@chudnick.com>2023-06-25 09:52:36 -0400
commit95b73daa36b23565a8566f71f9b202d3459b685f (patch)
treecb17b021be70e7868d0ec235a761f0ecdc80f3f2 /data/nextcloud
Initial CommitHEADmaster
Diffstat (limited to 'data/nextcloud')
-rw-r--r--data/nextcloud/nextcloud.conf45
1 files changed, 45 insertions, 0 deletions
diff --git a/data/nextcloud/nextcloud.conf b/data/nextcloud/nextcloud.conf
new file mode 100644
index 0000000..7528dbe
--- /dev/null
+++ b/data/nextcloud/nextcloud.conf
@@ -0,0 +1,45 @@
1map $http_upgrade $connection_upgrade {
2 default upgrade;
3 '' close;
4}
5
6server {
7 listen 443 ssl;
8 server_name nextcloud.chudnick.com;
9
10 ssl_certificate /etc/letsencrypt/live/chudnick.com/fullchain.pem;
11 ssl_certificate_key /etc/letsencrypt/live/chudnick.com/privkey.pem;
12 add_header Strict-Transport-Security "max-age=31536000" always;
13 ssl_stapling on;
14 ssl_stapling_verify on;
15
16 # Security / XSS Mitigation Headers
17 add_header X-Frame-Options "SAMEORIGIN";
18 add_header X-XSS-Protection "1; mode=block";
19 add_header X-Content-Type-Options "nosniff";
20
21 location / {
22 proxy_pass http://localhost:8005;
23
24 proxy_set_header Host $host;
25 proxy_set_header X-Real-IP $remote_addr;
26 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
27 proxy_set_header X-Forwarded-Proto $scheme;
28 proxy_set_header X-Forwarded-Protocol $scheme;
29 proxy_set_header X-Forwarded-Host $http_host;
30 client_max_body_size 0;
31
32 # Websocket
33 proxy_http_version 1.1;
34 proxy_set_header Upgrade $http_upgrade;
35 proxy_set_header Connection $connection_upgrade;
36 }
37
38}
39
40server {
41 listen 80;
42 listen [::]:80;
43 server_name nextcloud.chudnick.com;
44 return 301 https://$host$request_uri;
45}