add internal domains
This commit is contained in:
@@ -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
|
||||
<VirtualHost *:80>
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user