LaughterOnWater

Apache2 Site Management Cheat Sheet

Mar 7th, 2019
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. To enable a new apache2 dev site on ubuntu virtualbox hosted on Windows 10:
  2.  
  3. Go to the available sites:
  4. $ cd /etc/apache2/sites-available
  5.  
  6. Determine which you want to enable and use this format:
  7. $ ls
  8. sandbox.conf sandbox2.conf mydevsite.conf
  9. $ a2ensite sandbox sandox2 mydevsite
  10. Enabling site sandbox.
  11. Enabling site sandbox2.
  12. Enabling site generalsandbox.
  13. To activate the new configuration, you need to run:
  14. systemctl reload apache2
  15.  
  16. Restart apache2:
  17. $ systemctl reload apache2
  18. <you'll be asked for a password.>
  19.  
  20. Go to your windows host file on Windows:
  21. Open Sublime Text Editor as an Administrator.
  22. Open file C:\Windows\System32\drivers\etc\hosts
  23.  
  24. Using the exposed IP address of your virtualbox, type in the hosts.
  25. 192.168.1.15 sandbox sandbox2 mydevsite
Advertisement
Add Comment
Please, Sign In to add comment