Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- echo -n "Write the name of the new site!"
- read site_name
- # Information collection done!
- # Setting up directories for the new website
- mkdir /var/www/$site_name
- cp /opt/www_data/index.php /var/www/$site_name/
- chown -R www-data /var/www/$site_name/*
- # Directory setup done!
- # Apache2 Config!
- sed -e "s/$site_name/new_site/g" /opt/www_data/new_site >/etc/apache2/sites-available/$site_name
- ln -sf /etc/apache2/sites-available/$site_name /etc/apache2/sites-enabled/$site_name
- # Apache2 config done!
- # Restarting apache to apply the new settings!
- echo -n "Apache is now being restarted!"
- /etc/init.d/apache2 reload
- # End of Apache2 restart
- echo -n "All operations are now completed!"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement