/**
Add this to config.php (in /nextcloud/config/config.php)
to make the nextcloud instance aware of being in a proxy
and using correct information when making URLs
**/
'trusted_proxies' => ['172.0.0.1'],
'overwritehost' => 'domain.com',
'overwriteprotocol' => 'https',
'overwritecondaddr' => '^172.0.0.1$',
//This use case assumes you are using a docker container.
//If not you can change the ip information too
server {
listen 80;
server_name domain.com;
return 301 https://$server_name$request_uri;
}
server {
listen 443 ssl;
server_name domain.com ;
/**If you are using letsencrypt with default file locations
Use "certbot certonly -d domain.com" to generate the ssl certs
remember to turn off your nginx before generating ssl certs**/
ssl_certificate /etc/letsencrypt/live/domain.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/domain.com/privkey.pem;
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
ssl_session_cache shared:SSL:10m;
ssl_protocols TLSv1.2;
ssl_ciphers 'ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256';
ssl_prefer_server_ciphers on;
client_max_body_size 2048M;
location / {
proxy_pass http://172.0.0.1:8080;
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;
proxy_read_timeout 300;
}
location /.well-known/carddav {
return 301 $scheme://$host/remote.php/dav;
}
location /.well-known/caldav {
return 301 $scheme://$host/remote.php/dav;
}
Code Example |
---|
C :: grep find and replace |
C :: rl_replace_line |
C :: octave sum all elements in matrix |
C :: send http request in C |
C :: how to get user input in c |
C :: random number c |
C :: reverse integer in c |
C :: how to shutdown system c++ |
C :: random in c |
C :: determination of armstrong number in c |
C :: clrscr in c |
C :: const godot gdscript |
C :: sdl2 c programming |
C :: recursion to convert decimal to binary |
C :: redirect to url page asp.net mvc |
C :: c print multiple variables |
C :: Area of a Circle in C Programming |
C :: merge sort for strings in c |
C :: c check if array is empty |
C :: how to get the ascii value of a character in c |
C :: Grepper VSCode Add On |
C :: signal function c |
C :: c find last element in array |
C :: link list c |
C :: print float in c |
C :: pygramid program in c |
C :: do while loop in c |
C :: ltoa in c |
C :: how to open form in vb.net |
C :: declaration of string in c |