mirror of
https://github.com/bastienwirtz/homer.git
synced 2026-01-23 02:15:09 +00:00
Added feature for subfolder hosting
By setting the SUBFOLDER env var, you can host Homer in a subfolder behind a reverse proxy.
This commit is contained in:
parent
af0a6e89c9
commit
caf5fae8a8
2 changed files with 10 additions and 0 deletions
|
|
@ -11,5 +11,11 @@ fi
|
|||
# Install default config if no one is available.
|
||||
yes n | cp -i /www/default-assets/config.yml.dist /www/assets/config.yml &> /dev/null
|
||||
|
||||
# Create symbolic link for hosting in subfolder.
|
||||
if [[ -n "${SUBFOLDER}" ]]; then
|
||||
ln -s /www "/www/$SUBFOLDER"
|
||||
chown -h $USER:$GROUP "/www/$SUBFOLDER"
|
||||
fi
|
||||
|
||||
chown -R $UID:$GID /www/assets
|
||||
exec su-exec $UID:$GID darkhttpd /www/ --no-listing --port "$PORT"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue