add nginx.conf and improve readme

This commit is contained in:
2025-03-27 19:21:59 +01:00
parent 119196a1cc
commit 52489241d7
16 changed files with 162 additions and 4 deletions

View File

@ -5,7 +5,7 @@ services:
image: nextcloud:production
restart: always
ports:
- 80:80
- 8080:80
volumes:
- /data:/data:rw
- ./data:/var/www/html

30
nextcloud/nginx.conf Normal file
View File

@ -0,0 +1,30 @@
server {
server_name sudomain.your.domain;
client_max_body_size 0;
# proxy_buffering off;
location / {
proxy_pass http://localhost:8080/; # set this to the nextcloud port set in doccker-compose file
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
client_max_body_size 0;
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload";
#access_log /var/log/nginx/nextcloud.access.log;
#error_log /var/log/nginx/nextcloud.error.log;
}
location = /.well-known/carddav {
return 301 $scheme://$host/remote.php/dav;
}
location = /.well-known/caldav {
return 301 $scheme://$host/remote.php/dav;
}
listen 80;
}