Skip to content

Instantly share code, notes, and snippets.

@utarn
Created February 19, 2024 09:11
Show Gist options
  • Save utarn/4cfeecf5d55e88feb6af2d7de584f9e9 to your computer and use it in GitHub Desktop.
Save utarn/4cfeecf5d55e88feb6af2d7de584f9e9 to your computer and use it in GitHub Desktop.
Nextcloud nginx configuration
server {
server_name nextcloud.mydomain.com;
client_max_body_size 2G;
location / {
proxy_pass http://localhost:5001;
proxy_set_header Host $http_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 https;
proxy_cache_bypass $http_upgrade;
}
access_log /var/log/nginx/nextcloud_access.log;
error_log /var/log/nginx/nextcloud_error.log warn;
gzip on;
gzip_proxied any;
gzip_types
text/css
text/javascript
text/xml
text/plain
application/javascript
application/x-javascript
application/json
application/x-www-form-urlencoded;
listen 80;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment