I was not able to save the file. How do I save the file? I ran:
vim /etc/apache2/sites-available/laravel.example.com.conf
I was not able to save the file. How do I save the file? I ran:
vim /etc/apache2/sites-available/laravel.example.com.conf
You can't edit apache configuration file without root privilege. Use sudo to run vim:
sudo vim /etc/apache2/sites-available/laravel.example.com.conf
vim is a very powerful tool but not exactly easy to use. As a new user, I suggest you instead use nano. Alternatively, you can take the time to learn one of the great editors like vim, emacs etc. If you don't want to take the time to do so, however, stick to nano or gedit.
That said, in order to edit a file in vim, you first need to hit iEsc to leave the INSERT mode, then : to enter commands and wq and then Enter (that's :wq). That will write the file and quit the editor.
Of course, as pointed out by @SuB, you need to do all this (in whatever editor you choose) as root, so sudo vim /path.to/file or sudo nano /path/to/file etc.