diff --git a/docs/install.md b/docs/install.md index f67f645d06..8d06b6fc64 100644 --- a/docs/install.md +++ b/docs/install.md @@ -67,89 +67,6 @@ Element Web requires specific caching headers to work correctly. The following f Additionally, configure `Cache-Control: no-cache` for `/` to force browsers to revalidate on page load. -#### Nginx Configuration - -Create a server block for Element Web (e.g., `/etc/nginx/sites-available/element`): - -```nginx -server { - listen 80; - listen [::]:80; - server_name element.example.com; - - # Redirect HTTP to HTTPS - return 301 https://$server_name$request_uri; -} - -server { - listen 443 ssl http2; - listen [::]:443 ssl http2; - server_name element.example.com; - - # SSL configuration - ssl_certificate /etc/ssl/certs/element.example.com.crt; - ssl_certificate_key /etc/ssl/private/element.example.com.key; - ssl_protocols TLSv1.2 TLSv1.3; - ssl_ciphers HIGH:!aNULL:!MD5; - - # Document root - root /var/www/element; - index index.html; - - # Caching configuration - # Disable caching for index.html to ensure updates are loaded - location = /index.html { - add_header Cache-Control "no-cache"; - } - - # Disable caching for version file - location = /version { - add_header Cache-Control "no-cache"; - } - - # Disable caching for config files - location ~* ^/config.*\.json$ { - add_header Cache-Control "no-cache"; - } -} -``` - -Enable the site and reload nginx: - -```bash -sudo ln -s /etc/nginx/sites-available/element /etc/nginx/sites-enabled/ -sudo nginx -t -sudo systemctl reload nginx -``` - -#### Caddy Configuration - -Create a Caddyfile for Element Web (e.g., `/etc/caddy/Caddyfile`): - -```caddyfile -element.example.com { - # Caddy automatically handles HTTPS with Let's Encrypt - - # Document root - root * /var/www/element - - # Enable file serving - file_server - - # Disable caching for specific files and directories - @nocache { - path /index.html /version /config*.json - } - header @nocache Cache-Control "no-cache" -} -``` - -Reload Caddy: - -```bash -sudo caddy reload --config /etc/caddy/Caddyfile -``` - ## Debian package Element Web is now also available as a Debian package for Debian and Ubuntu based systems.