Fix 403 Forbidden by switching all paths from /mnt/user to /mnt/cache
/mnt/user is a FUSE filesystem on Unraid that is unavailable inside Docker containers. The container sees an empty /var/www/html, Apache finds no index.php, and returns 403 because Options -Indexes is set. All volume mount paths and git clone instructions updated to use the cache drive path (/mnt/cache/appdata/alwisp) directly. Added an explanatory warning note in Step 1. https://claude.ai/code/session_015wpwmheufcxkBuXivrSHhd
This commit is contained in:
30
README.md
30
README.md
@@ -41,12 +41,14 @@ Each container is deployed individually through the Unraid Container Builder and
|
||||
|
||||
---
|
||||
|
||||
### Step 1 – Clone the repository onto your Unraid share
|
||||
### Step 1 – Clone the repository onto your Unraid cache drive
|
||||
|
||||
> **Unraid volume mount requirement:** Docker containers on Unraid **cannot reliably access `/mnt/user/` paths**. `/mnt/user` is a FUSE filesystem that is not available inside the Docker container namespace — the container sees an empty directory, Apache finds no files, and returns a 403 Forbidden. Always clone and mount from the **cache drive path directly** (`/mnt/cache/appdata/`).
|
||||
|
||||
Open an Unraid terminal (**Tools → Terminal** or SSH in):
|
||||
|
||||
```bash
|
||||
cd /mnt/user/appdata
|
||||
cd /mnt/cache/appdata
|
||||
git clone https://github.com/jasonMPM/alwisp.git
|
||||
cd alwisp
|
||||
```
|
||||
@@ -58,7 +60,7 @@ cd alwisp
|
||||
The web container uses a custom image built from the included `Dockerfile`. Build it once from the terminal — Unraid's Container Builder will reference it by name.
|
||||
|
||||
```bash
|
||||
cd /mnt/user/appdata/alwisp
|
||||
cd /mnt/cache/appdata/alwisp
|
||||
docker build -t alwisp_web:latest .
|
||||
```
|
||||
|
||||
@@ -93,8 +95,8 @@ docker build -t alwisp_web:latest .
|
||||
|
||||
| Container Path | Host Path | Access Mode |
|
||||
|---|---|---|
|
||||
| `/var/lib/mysql` | `/mnt/user/appdata/alwisp/db_data` | Read/Write |
|
||||
| `/docker-entrypoint-initdb.d/init.sql` | `/mnt/user/appdata/alwisp/docker/mysql/init.sql` | Read Only |
|
||||
| `/var/lib/mysql` | `/mnt/cache/appdata/alwisp/db_data` | Read/Write |
|
||||
| `/docker-entrypoint-initdb.d/init.sql` | `/mnt/cache/appdata/alwisp/docker/mysql/init.sql` | Read Only |
|
||||
|
||||
6. Click **Apply** — Unraid pulls the MySQL image and starts the container
|
||||
|
||||
@@ -130,8 +132,8 @@ docker build -t alwisp_web:latest .
|
||||
|
||||
| Container Path | Host Path | Access Mode |
|
||||
|---|---|---|
|
||||
| `/var/www/html` | `/mnt/user/appdata/alwisp/www` | Read/Write |
|
||||
| `/etc/apache2/ssl` | `/mnt/user/appdata/alwisp/docker/apache/ssl` | Read Only |
|
||||
| `/var/www/html` | `/mnt/cache/appdata/alwisp/www` | Read/Write |
|
||||
| `/etc/apache2/ssl` | `/mnt/cache/appdata/alwisp/docker/apache/ssl` | Read Only |
|
||||
|
||||
> The Apache vhost config (`000-default.conf`) is baked directly into the image via `COPY` in the Dockerfile — no bind mount needed. To change it, edit the file in `docker/apache/` and rebuild the image.
|
||||
|
||||
@@ -192,7 +194,7 @@ Because the web container has a dedicated LAN IP, reverse proxy setup is straigh
|
||||
1. Add a **Proxy Host** in Nginx Proxy Manager
|
||||
2. Forward hostname/IP: `192.168.1.100` (the web container's br0 IP), port `80`
|
||||
3. Enable SSL via Let's Encrypt
|
||||
4. Drop your certificate files into `/mnt/user/appdata/alwisp/docker/apache/ssl/` — they are already mounted into the container
|
||||
4. Drop your certificate files into `/mnt/cache/appdata/alwisp/docker/apache/ssl/` — they are already mounted into the container
|
||||
|
||||
---
|
||||
|
||||
@@ -200,7 +202,7 @@ Because the web container has a dedicated LAN IP, reverse proxy setup is straigh
|
||||
|
||||
| Setting | Value |
|
||||
|---|---|
|
||||
| Share path | `/mnt/user/appdata/alwisp` |
|
||||
| Share path | `/mnt/cache/appdata/alwisp` |
|
||||
| Use cache | Yes (cache-only or prefer) |
|
||||
| Exclude from backup | No — include in Appdata backup |
|
||||
|
||||
@@ -330,15 +332,15 @@ alwisp/
|
||||
|
||||
## Updating the Site
|
||||
|
||||
Because `/mnt/user/appdata/alwisp/www` is bind-mounted directly into `alwisp_web`, **PHP and asset changes take effect immediately** — no rebuild or restart needed.
|
||||
Because `/mnt/cache/appdata/alwisp/www` is bind-mounted directly into `alwisp_web`, **PHP and asset changes take effect immediately** — no rebuild or restart needed.
|
||||
|
||||
```bash
|
||||
# Pull latest code
|
||||
cd /mnt/user/appdata/alwisp
|
||||
cd /mnt/cache/appdata/alwisp
|
||||
git pull origin main
|
||||
|
||||
# If the Dockerfile changed, rebuild the image and restart the web container:
|
||||
docker build -t alwisp_web:latest /mnt/user/appdata/alwisp
|
||||
docker build -t alwisp_web:latest /mnt/cache/appdata/alwisp
|
||||
docker restart alwisp_web
|
||||
```
|
||||
|
||||
@@ -350,7 +352,7 @@ The database container (`alwisp_db`) is completely independent — updates to th
|
||||
|
||||
```bash
|
||||
# Rebuild the web image after Dockerfile changes
|
||||
docker build -t alwisp_web:latest /mnt/user/appdata/alwisp
|
||||
docker build -t alwisp_web:latest /mnt/cache/appdata/alwisp
|
||||
|
||||
# Start / stop individual containers
|
||||
docker start alwisp_web
|
||||
@@ -371,7 +373,7 @@ docker exec -it alwisp_web bash
|
||||
docker exec -it alwisp_db mysql -u alwisp_user -p alwisp
|
||||
|
||||
# Manual database backup
|
||||
docker exec alwisp_db mysqldump -u alwisp_user -p alwisp > /mnt/user/appdata/alwisp/backups/backup_$(date +%F).sql
|
||||
docker exec alwisp_db mysqldump -u alwisp_user -p alwisp > /mnt/cache/appdata/alwisp/backups/backup_$(date +%F).sql
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
Reference in New Issue
Block a user