diff --git a/server/list-web-users.sh b/server/list-web-users.sh
index 7e97d7c..1618114 100755
--- a/server/list-web-users.sh
+++ b/server/list-web-users.sh
@@ -3,6 +3,7 @@
# echo "* * * * * root /root/scripts/server/list-web-users.sh" > /etc/cron.d/list-web-users
DOMAINROOT="mit.tareo-tz.org"
+INTDOMAINROOT="web.intra"
WEBDIR="/var/www/html/html"
> $WEBDIR/websites.txt
@@ -11,8 +12,9 @@ find /var/www/* -maxdepth 0 -type d -print0 | while IFS= read -r -d $'\0' line;
USER=$(basename $line)
DOMAIN="$USER.$DOMAINROOT"
+ INTDOMAIN="$USER.$INTDOMAINROOT"
if [ ! "$USER" == "html" ] && [ ! "$USER" == "pma" ]; then
- echo "
$DOMAIN" >> $WEBDIR/websites.txt
+ echo "$INTDOMAIN (alternatively $DOMAIN)" >> $WEBDIR/websites.txt
fi
done
diff --git a/server/new-web-user.sh b/server/new-web-user.sh
index 9a14bf6..1aef628 100755
--- a/server/new-web-user.sh
+++ b/server/new-web-user.sh
@@ -1,6 +1,7 @@
#!/bin/bash
DOMAINROOT="mit.tareo-tz.org"
+INTDOMAINROOT="web.intra"
WEBROOT="/var/www"
DATASHEETS="/root/datasheets"
@@ -22,10 +23,12 @@ fi
read -p "Password of $USER: " PASS
DOMAIN="$USER.$DOMAINROOT"
-echo "The new user's domain will be $DOMAIN"
+INTDOMAIN="$USER.$INTDOMAINROOT"
+echo "The new user's domain will be $DOMAIN. The internal domain will be $INTDOMAIN"
read -p "Is that ok? [Y/n]" yn
if [ "$yn" == "n" ]; then
read -p "Type in custom domain: " DOMAIN
+ read -p "Type in custom internal domain: " INTDOMAIN
fi
WEBDIR="$WEBROOT/$USER"
@@ -97,7 +100,7 @@ echo "[INFO] Configuring Apache VirtualHost..."
cat > /etc/apache2/sites-available/$USER.conf << EOF
ServerAdmin info@tareo-tz.org
- ServerName $USER.server.local
+ ServerName $INTDOMAIN
ServerAlias $DOMAIN
SuexecUserGroup $USER $USER
AddHandler fcgid-script .php
@@ -164,10 +167,10 @@ cat > $DATASHEETS/datasheet-$USER.txt << EOF
################################
# Webserver
-URL: $DOMAIN
+URL: $INTDOMAIN
# FTP (Use FileZilla)
-Server: http://$DOMAIN
+Server: http://$INTDOMAIN
Port: 22
Protocol: SFTP
Logon type: Normal
@@ -182,7 +185,7 @@ User Name: $USER
Password: $PASS
Database Host: localhost
-phpMyAdmin: http://pma.$DOMAINROOT
+phpMyAdmin: http://pma.$INTDOMAINROOT
EOF
enscript -p $DATASHEETS/datasheet-$USER.ps $DATASHEETS/datasheet-$USER.txt