Paths to images are messed up in Vagrant All the paths linking to modules, javascript, css are correct when I move a site locally and run in a vagrant environment. Yet, the image paths stored in the site come out wrong, so they are all borked.

The console in Chrome shows the paths to the images as skipping a folder. This is how the path looks: localhost/sites/default/files/img.jpg 

This is how the path should look: localhost/sitename/sites/default/files/img.jpg

For some reason, Drupal in Vagrant looks for the sites folder in the localhost folder. I feel like something is wrong with the way apache is set up on my Vagrant installation. But I suppose it could be a number of things. Does anyone know?
you should add your site name to the base url in .htaccess file and uncomment the base url code.