mirror of
https://github.com/dokku/dokku.git
synced 2025-12-28 16:06:40 +01:00
Merge pull request #86 from eugeneware/domain_support
support for fully qualified domain names not just subdomains
This commit is contained in:
@@ -3,7 +3,13 @@ set -e
|
||||
APP="$1"; PORT="$2"
|
||||
|
||||
if [[ -f "$HOME/VHOST" ]]; then
|
||||
hostname="${APP/\//-}.$(< "$HOME/VHOST")"
|
||||
VHOST=$(< "$HOME/VHOST")
|
||||
SUBDOMAIN=${APP/%\.${VHOST}/}
|
||||
if [[ "$APP" == *.* ]] && [[ "$SUBDOMAIN" == "$APP" ]]; then
|
||||
hostname="${APP/\//-}"
|
||||
else
|
||||
hostname="${APP/\//-}.$VHOST"
|
||||
fi
|
||||
cat<<EOF > $HOME/$APP/nginx.conf
|
||||
upstream $APP { server 127.0.0.1:$PORT; }
|
||||
server {
|
||||
|
||||
Reference in New Issue
Block a user