diff --git a/CHANGELOG.md b/CHANGELOG.md index 67ca46c..9c570c7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## Changes 4/24/2025 + +- Enhance README and wiki with expanded installation instructions +- Adjusted Dockerfile’s Apache vhost to: + - Alias `/uploads/` to `/var/www/uploads/` with PHP engine disabled and directory indexes off + - Disable HTTP TRACE and tune keep-alive (On, max 100 requests, 5s timeout) and server Timeout (60s) + - Add security headers (`X-Frame-Options`, `X-Content-Type-Options`, `X-XSS-Protection`, `Referrer-Policy`) + - Enable `mod_deflate` compression for HTML, plain text, CSS, JS and JSON + - Configure `mod_expires` caching for images (1 month), CSS (1 week) and JS (3 hour) + - Deny access to hidden files (dot-files) +- Add access control in public/.htaccess for api.html & openapi.json; update Nginx example in wiki +- Remove obsolete folders from repo root + ## Changes 4/23/2025 1.2.4 **AuthModel** diff --git a/Dockerfile b/Dockerfile index 94c9ff3..07dbf20 100644 --- a/Dockerfile +++ b/Dockerfile @@ -62,19 +62,64 @@ RUN chown -R root:www-data /var/www && \ # Apache site configuration RUN cat <<'EOF' > /etc/apache2/sites-available/000-default.conf + # Global settings + TraceEnable off + KeepAlive On + MaxKeepAliveRequests 100 + KeepAliveTimeout 5 + Timeout 60 + ServerAdmin webmaster@localhost DocumentRoot /var/www/public + + # Security headers for all responses + + Header always set X-Frame-Options "SAMEORIGIN" + Header always set X-Content-Type-Options "nosniff" + Header always set X-XSS-Protection "1; mode=block" + Header always set Referrer-Policy "strict-origin-when-cross-origin" + + + # Compression + + AddOutputFilterByType DEFLATE text/html text/plain text/css application/javascript application/json + + + # Cache static assets + + ExpiresActive on + ExpiresByType image/jpeg "access plus 1 month" + ExpiresByType image/png "access plus 1 month" + ExpiresByType text/css "access plus 1 week" + ExpiresByType application/javascript "access plus 3 hour" + + + # Protect uploads directory Alias /uploads/ /var/www/uploads/ Options -Indexes AllowOverride None + + php_flag engine off + + + php_flag engine off + Require all granted + + # Public directory AllowOverride All Require all granted - DirectoryIndex index.html + DirectoryIndex index.html index.php + + # Deny access to hidden files + + Require all denied + + ErrorLog /var/www/metadata/log/error.log CustomLog /var/www/metadata/log/access.log combined diff --git a/README.md b/README.md index c1e9421..89d42c6 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # FileRise **Elevate your File Management** – A modern, self-hosted web file manager. -Upload, organize, and share files through a sleek web interface. **FileRise** is lightweight yet powerful: think of it as your personal cloud drive that you control. With drag-and-drop uploads, in-browser editing, secure user logins (with SSO and 2FA support), and one-click sharing, **FileRise** makes file management on your server a breeze. +Upload, organize, and share files or folders through a sleek web interface. **FileRise** is lightweight yet powerful: think of it as your personal cloud drive that you control. With drag-and-drop uploads, in-browser editing, secure user logins (with SSO and 2FA support), and one-click sharing, **FileRise** makes file management on your server a breeze. **4/3/2025 Video demo:** @@ -115,7 +115,7 @@ If you prefer to run FileRise on a traditional web server (LAMP stack or similar git clone https://github.com/error311/FileRise.git ``` -Place the files into your web server’s directory (e.g., `/var/www/html/filerise`). It can be in a subfolder (just adjust the `BASE_URL` in config as below). +Place the files into your web server’s directory (e.g., `/var/www/public`). It can be in a subfolder (just adjust the `BASE_URL` in config as below). - **Composer Dependencies:** If you plan to use OIDC (SSO login), install Composer and run `composer install` in the FileRise directory. (This pulls in a couple of PHP libraries like jumbojett/openid-connect for OAuth support.) diff --git a/public/.htaccess b/public/.htaccess index dd58d5e..41825cb 100644 --- a/public/.htaccess +++ b/public/.htaccess @@ -15,6 +15,10 @@ DirectoryIndex index.html Require all denied + + Require valid-user + + # ----------------------------- # Enforce HTTPS (optional) # ----------------------------- diff --git a/uploads/.gitkeep b/uploads/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/uploads/.htaccess b/uploads/.htaccess deleted file mode 100644 index 651f7db..0000000 --- a/uploads/.htaccess +++ /dev/null @@ -1,7 +0,0 @@ - - php_flag engine off - - - php_flag engine off - - Options -Indexes \ No newline at end of file diff --git a/users/.gitkeep b/users/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/users/.htaccess b/users/.htaccess deleted file mode 100644 index b94f347..0000000 --- a/users/.htaccess +++ /dev/null @@ -1,3 +0,0 @@ - - Require all denied - \ No newline at end of file