httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From juanca <jua...@sat.com.py>
Subject [users@httpd] Problems with virtualhosts pease I need help
Date Thu, 27 Mar 2003 23:15:34 GMT
On Thursday 27 March 2003 18:48, juanca wrote:
On Thursday 27 March 2003 18:18, juanca wrote:
hi all
 I`ve got a problem with my apache
  I added a new virtualhost, then I put the new virtualhost  in my mozilla
 However  it shows my main domain and not my new virtual host I mean this
 is my main domain for example www.maiidomain.com and my virtualhost is
 this www.virtualhost.com, now when I put www.virtualhost.com It shows me
 www.maindomain.com, this is my script to add a virtual host.
 I`ve got 14 domains in my apache and this the firts time that I have this
 problem, please y need help as soon as possible

IP=the number

 useradd $1
groupadd -g `id -u $1` $1
usermod -g `id -u $1` $1
mkdir /home/$1

 chown $1 /home/$1 -R
chgrp $1 /home/$1 -R

chmod 755 /home/$1

mkdir /var/www/$1

 chown $1 /var/www/$1 -R
 chgrp $1 /var/www/$1 -R

 ln -s /var/www/$1 /home/$1/www

 cat <<EOT >> /etc/apache/httpd.conf

 # Agregado automáticamente por addvdomain
 <VirtualHost www.$1:80>
    ServerAdmin webmaster@$1
     DocumentRoot /var/www/$1
 User $1
   Group $1
    ServerName www.$1
    ErrorLog /var/log/apache/$1-error.log
    CustomLog /var/log/apache/$1-access.log common
 </VirtualHost>
 EOT

 cat <<EOT >> /etc/bind/named.conf

// Generado automáticamente por addvdomain
 zone "$1" {
      type master;
      file "/var/cache/bind/$1/zone.$1";
 };
 EOT

mkdir /var/cache/bind/$1

 cat << EOT >> /var/cache/bind/$1/zone.$1
 ; Generado automáticamente por addvdomain
 \$TTL   604800
@       IN      SOA     hostname.$1. hostmaster.$1. (
                              1         ; Serial
                        604800         ; Refresh
                      86400         ; Retry
                       2419200         ; Expire

 ;
 @       IN      NS              hostname
 @       IN      MX      5      hostname
 hostname IN     A               $IP

 ;
 www     IN      CNAME   hostname
 ftp     IN      CNAME   hostname
 mail    IN      CNAME   hostname
 webmail IN      CNAME   hostname
 EOT

 passwd $1


> > ---------------------------------------------------------------------
> > The official User-To-User support forum of the Apache HTTP Server
> > Project. See <URL:http://httpd.apache.org/userslist.html> for more info.
> > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> >    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> > For additional commands, e-mail: users-help@httpd.apache.org
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message