Advertisement
sergio_educacionit

new_vhost.sh

Dec 27th, 2022
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3.  
  4. # Ingreso del nombre del sistio
  5. read -p "Nombre del sitio (i.e example.com): " site
  6.  
  7. # Generacion del vhost
  8. sed 's/#ServerName/ServerName '$site'/' template > /etc/apache2/sites-available/$site.conf
  9.  
  10. # Activacion de sitio
  11. a2ensite $site.conf
  12.  
  13. # Recargar de ficheros de configuracion de apache
  14. systemctl reload apache2
  15.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement