落絮飞雁

顺流而下,把梦做完

How to Install KaraDAV on Lolipop! Hosting

KaraDAV is a lightweight, PHP‑based WebDAV server that lets you manage files and folders through a web interface. While Nextcloud offers extensive features, KaraDAV provides a 10x lighter solution perfect for resource-constrained hosts like Lolipop.jp. In this post, we’ll walk through installing KaraDAV on a Lolipop! rental server. We’ll follow the instructions from the KaraDAV repository’s INSTALL.md file and adapt them for a shared hosting environment where you likely manage your site via a control panel and FTP.

Before you begin, here’s what you need to know:

  • KaraDAV Requirements:
  • PHP 8.0 or higher
  • The PHP extensions: php-sqlite3 and php-simplexml
  • Hosting Environment:
  • Lolipop! hosting uses Apache (or LiteSpeed on higher-tier plans).
  • Custom virtual host configuration is not available in the same way as on a VPS; instead, you’ll rely on your account’s document root and use an .htaccess file to set up rewrite rules.
  • Installation Steps Overview:
  1. Prepare your environment on Lolipop!
  2. Download (or clone) KaraDAV and upload its files.
  3. Configure KaraDAV by editing its configuration file.
  4. Set up URL rewriting using an .htaccess file.
  5. Test your installation and secure your default admin account.

Let’s dive into the step-by-step process.


Step 1: Prepare Your Hosting Environment

Log in to your Lolipop! control panel and check that your server is set to run PHP 8.0 or higher. If needed, change the PHP version (Lolipop! allows you to select the PHP version for your account), both the CGI version and modular version works. For me, I am using the PHP 8.3 modular version. Also verify that the required PHP extensions—php-sqlite3 and php-simplexml—are available by default, so you do not need to change these.


Step 2: Download and Upload the KaraDAV Files

KaraDAV’s official instructions advise you to download or clone the repository. On Lolipop!, you probably won’t have Git installed on your account, so it’s best to download and extract on your local computer, then upload these via FTP:

  • Connect to your Lolipop! hosting account using your preferred FTP client.
  • Upload the entire KaraDAV folder to your designated document root.
  • Note: If you’re using a custom domain or subdomain, upload the files into the directory specified by your control panel (typically the “www” folder).

Step 3: Set Up URL Rewriting with .htaccess

Since you’re on shared hosting with Lolipop!, you won’t have direct access to Apache’s virtual host configuration. Instead, you’ll use an .htaccess file to redirect all incoming requests to KaraDAV’s router script.

4.1 Create/Edit Your .htaccess File

In the same directory where your KaraDAV files are located (typically the “www” folder), create an .htaccess file (or edit the existing one) and add the following rewrite rules. Note that by default, lolipop.jp did not pass the HTTP ‘Authorization’ header, so we need to add it on the last line of the .htaccess file.

# Enable rewriting engine
RewriteEngine On
RewriteBase /

# If the requested file or directory does not exist,
# redirect the request to KaraDAV’s router script
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^.*$ /_router.php [L]
SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1

Conclusion

Installing KaraDAV on Lolipop! hosting is straightforward once you understand the environment. Note that you need to set the document root to www/ folder and pass the HTTP ‘Authorization’ header properly.

you can have a fully functional WebDAV server running on your Lolipop! account. Remember to secure your default admin account right away and, if desired, enable additional features like image thumbnails.

I hope this guide helps you get started with KaraDAV on Lolipop! hosting. For more details on the original installation steps, refer to the KaraDAV INSTALL.md on GitHub.

Happy hosting!


原文标题:How to Install KaraDAV on Lolipop! Hosting|落絮飞雁的个人网站
原文链接:https://www.luoxufeiyan.com/2025/02/10/how-to-install-karadav-on-lolipop-hosting/
授权协议:创作共用 署名-非商业性使用 2.5 中国大陆
除注明外,本站文章均为原创;转载时请保留上述链接。