E
There's actually a few ways. First, banal, use local patch. It's a good way, but it's very uncomfortable to develop properly, and one of the examples of inconvenience you described. You can go on and make yourself a folder in a home catalogue and fix the apacha configuration, but it's too bad. So I won't even sign this method in detail.A more advanced way is to use a real server. But he's also bad. Server's not usually free and easy. But I've seen a man who's got himself a cluster on raspberry pi and happy. It also purchased a dozen sdcards where various distributors are stored.And the simplest and right way is to use the docker. Let's see the pros:It is very easy to collect the required configuration (database with the right version, right-shaped apache, right axle).If you write a compose file, it's very easy to say "suck" or "admin," whatever it takes.It's easy to keep a few different websites, not town with configurations.Docker is available not only for linux, but also for makosy, but has recently become available to Windows, which allows a lot.A lot of hosters are now providing a doker host. I mean, the tide of your website on such a host is to copy the dockerfile or compose the file and launch it.How to build it and launch it. First of all, we need to put the docker down, and preferably, docker-compose♪ Read the masks to your axis.Next, we need to figure out how to get the sorcerers. There are several ways.Hardcore to install a ví/nano/emax in the doker and develop it directly. But it's for amateurs. But this way has its advantages. The development environment can migrate peacefully between computers.Simple. Docker can use a card from the car host. I mean, the project file is connected to the docker. There's two ways to do this, or just connect the docker file.ADD /host/path /path/inside/docker/container) or at the start of the container (docker run -v /host/directory:/container/directory ...) You can copy the files when the container starts. If it's right to compromise, it'll all live in a container and a work catalogue. And if the Docker's right, they don't even have to be right.complex, but beautiful. It's a beautiful and right way to build a system of "dog." This way for small projects is superfluous, but for more complex projects, it's costing. At the start, a violin is written, which can fill the files and make the necessary manipulations (exit rights, reset the apache, run the base). And the violin itself starts either with his hands or chains to the cock on the comedian/push.Now, a list of useful references.the website. https://docs.docker.com/v1.8/userguide/ ♪How to create an environment for work. http://blog.osteel.me/posts/2015/12/18/from-vagrant-to-docker-how-to-use-docker-for-local-web-development.html ♪and another article on the subject http://www.newmediacampaigns.com/blog/docker-for-php-developers ♪article https://habrahabr.ru/post/247547/ where it is also explained how to build dnsmask, which will allow local dns to be tested with actual addresses and without modifying the hosts of the file.