I have to work with several of someone else’s PHP projects that have paths hard-coded in such a way that I have to put each project in my /var/www/ directory one at a time to run it – instead of being able to it in its own subdirectory, like /var/www/project_name.
Is there some way to work around this so I don’t have to put each project directly in my webroot directory? Having to do that lets me only work with one project at a time with my local LAMP server!
Edit: For doing it the “VirtualHost” way, what would my ServerName be for project_name? I’ve tried just project_name but that doesn’t seem to work.
something like this to your
hostsfileIn apache create a virtual server for each of them, each with their own webroot
(and what could be more important) logfiles.
browse to them via http://localproject1, http://localproject2, …