mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-10-24 23:10:41 +02:00
Document -urlPrefix flag for subdirectory deployment
1 parent
97f8ac72be
commit
dbdc812c94
1 file changed
+27
+27
@@ -32,6 +32,7 @@ weed admin [options]
|
||||
| `-adminPassword` | "" | Admin interface password (if empty, auth is disabled) |
|
||||
| `-readOnlyUser` | "" | Read-only user username (optional) |
|
||||
| `-readOnlyPassword` | "" | Read-only user password (optional; requires adminPassword) |
|
||||
| `-urlPrefix` | "" | URL path prefix for subdirectory deployment (e.g. `/seaweedfs`) |
|
||||
|
||||
## Examples
|
||||
|
||||
@@ -58,6 +59,27 @@ weed admin -port=23646 -masters="localhost:9333" -dataDir="~/seaweedfs-admin"
|
||||
weed admin -adminUser=admin -adminPassword=secret123 -masters="localhost:9333"
|
||||
```
|
||||
|
||||
### Behind a Reverse Proxy (Subdirectory)
|
||||
|
||||
```bash
|
||||
# Serve the admin UI under /seaweedfs/ subdirectory
|
||||
weed admin -masters="localhost:9333" -urlPrefix=/seaweedfs
|
||||
```
|
||||
|
||||
With this configuration, the admin UI is accessible at `http://localhost:23646/seaweedfs/admin`. All static assets, API endpoints, navigation links, and session cookies are automatically scoped to the prefix.
|
||||
|
||||
Example nginx reverse proxy configuration:
|
||||
|
||||
```nginx
|
||||
location /seaweedfs/ {
|
||||
proxy_pass http://localhost:23646/seaweedfs/;
|
||||
proxy_set_header Host $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 $scheme;
|
||||
}
|
||||
```
|
||||
|
||||
### Production Deployment
|
||||
|
||||
```bash
|
||||
@@ -275,6 +297,11 @@ Or with custom port:
|
||||
http://localhost:PORT
|
||||
```
|
||||
|
||||
If `-urlPrefix` is configured, include the prefix in the URL:
|
||||
```
|
||||
http://localhost:23646/seaweedfs/admin
|
||||
```
|
||||
|
||||
### Dashboard (/)
|
||||
|
||||
The main dashboard provides a comprehensive overview of your SeaweedFS cluster:
|
||||
|
||||
Reference in new issue
Block a user