ip="95.163.17.228"
nam="tvazar"
cd /root/www/
cp -r base/ $nam

echo $ip $nam'.ru www.'$nam'.ru' >> /etc/hosts

cd /etc/apache2/sites-available/
touch $nam'.ru'

echo ' <VirtualHost *:80>
ServerAdmin vartv27@mail.ru
ServerName www.'$nam'.ru
ServerAlias '$nam'.ru

# Indexes + Directory Root.
DirectoryIndex index.html index.php
DocumentRoot /var/www/'$nam'/htdocs/

# CGI Directory
ScriptAlias /cgi-bin/ /var/www/'$nam'/cgi-bin/
<Location /cgi-bin>
Options +ExecCGI
</Location>
# Logfiles
ErrorLog /var/www/'$nam'/logs/error.log
CustomLog /var/www/'$nam'/logs/access.log combined
</VirtualHost> ' >> $nam'.ru'

a2ensite $nam'.ru'
/etc/init.d/apache2 restart

 

*****************

1 раз нужно поменять apache2.conf

добавить

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)

   
© 2012 Программирование в удовольствие Яндекс.Метрика Suffusion theme by Sayontan Sinha