Advertisement
Guest User

Untitled

a guest
Mar 25th, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. echo "127.0.0.1 first.dev second.dev" >> /etc/hosts
  2.  
  3. apt-get install -y apache2
  4.  
  5. mkdir /var/www/first
  6. mkdir /var/www/second
  7.  
  8. echo 'First!!!' > /var/www/first/index.html
  9. echo 'Second!!!' > /var/www/second/index.html
  10.  
  11. echo '<VirtualHost *:80>
  12. ServerName first.dev
  13. DocumentRoot /var/www/first
  14. </VirtualHost>
  15. ' > /etc/apache2/sites-available/first.conf
  16.  
  17. echo '<VirtualHost *:80>
  18. ServerName second.dev
  19. DocumentRoot /var/www/second
  20. </VirtualHost>
  21. ' > /etc/apache2/sites-available/second.conf
  22.  
  23. a2ensite first
  24. a2ensite second
  25. service apache2 restart
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement