2022-11-03 00:25:43 +01:00
|
|
|
server {
|
|
|
|
listen 80;
|
|
|
|
server_name cloud.wojciechkozlowski.eu;
|
|
|
|
|
|
|
|
location ^~ /.well-known {
|
|
|
|
allow all;
|
|
|
|
root /var/www/html;
|
|
|
|
}
|
|
|
|
|
|
|
|
location / {
|
|
|
|
return 301 https://$server_name$request_uri;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
server {
|
2023-07-09 22:02:51 +02:00
|
|
|
listen 127.0.0.1:443 ssl;
|
2022-11-03 00:25:43 +01:00
|
|
|
server_name cloud.wojciechkozlowski.eu;
|
|
|
|
|
|
|
|
ssl_certificate /etc/letsencrypt/live/cloud.wojciechkozlowski.eu/fullchain.pem;
|
|
|
|
ssl_certificate_key /etc/letsencrypt/live/cloud.wojciechkozlowski.eu/privkey.pem;
|
|
|
|
ssl_trusted_certificate /etc/letsencrypt/live/cloud.wojciechkozlowski.eu/chain.pem;
|
|
|
|
|
2023-04-07 23:24:53 +02:00
|
|
|
# Values copied and adjusted from
|
|
|
|
# https://docs.nextcloud.com/server/latest/admin_manual/installation/nginx.html.
|
|
|
|
client_max_body_size 0;
|
2022-11-04 11:02:04 +01:00
|
|
|
client_body_timeout 3600s;
|
2022-11-04 11:07:43 +01:00
|
|
|
client_body_buffer_size 512k;
|
2022-11-04 11:02:04 +01:00
|
|
|
|
2022-11-03 00:25:43 +01:00
|
|
|
# Redirect rules copied from
|
|
|
|
# https://docs.nextcloud.com/server/latest/admin_manual/installation/nginx.html.
|
|
|
|
location ^~ /.well-known {
|
|
|
|
location = /.well-known/webfinger {
|
|
|
|
return 301 /index.php$uri;
|
|
|
|
}
|
|
|
|
location = /.well-known/nodeinfo {
|
|
|
|
return 301 /index.php$uri;
|
|
|
|
}
|
|
|
|
location = /.well-known/carddav {
|
|
|
|
return 301 /remote.php/dav/;
|
|
|
|
}
|
|
|
|
location = /.well-known/caldav {
|
|
|
|
return 301 /remote.php/dav/;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
location / {
|
|
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
|
|
proxy_set_header X-Forwarded-For $remote_addr;
|
|
|
|
proxy_set_header Host $host;
|
|
|
|
proxy_pass http://pod-cloud;
|
|
|
|
}
|
|
|
|
|
|
|
|
error_page 500 502 503 504 /50x.html;
|
|
|
|
location = /50x.html {
|
|
|
|
root /usr/share/nginx/html;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|