Answer the question
In order to leave comments, you need to log in
How can I host apache websites through virtualbox?
I have a virtualBox and it has LAMP on it. In apache configs I added the following config
<VirtualHost *:80>
ServerName test-site.dev
DocumentRoot /home/user/sites/test-site
ErrorLog /home/user/logs/test-site/error.log
CustomLog /home/user/logs/test-site/error.log combined
</VirtualHost>
127.0.0.1 test-site.dev
192.168.1.26 test-site.dev
Answer the question
In order to leave comments, you need to log in
I solved the problem, the result:
On the mac os operating system it works without any complaints, just add a line to the hosts and everything works.
For some reason, the .dev domain does not work on windows, when I changed it to .com, everything worked.
It is very likely that you misunderstand the principles of work, which is why you use the wrong words.
No. This entry is just an entry in a kind of "database of names" (the same hosts file), that is, consider it an analogue of DNS. That is, for the computer to apply for a match between the digital address and the corresponding text address, not to the configured DNS server (by default), but to receive a response from itself.
And it's not like that. As in the first case, there is simply a recognition (resolution) of a name to an address (resolve).
Yes, this will give the machines (both real and virtual) an understanding of the address where the packets will "go", but this is not a "transfer" at all.
But in general, there is a suspicion that the network of the machine in the virtual box is simply not configured correctly. Try switching the network to the "Network Bridge", so you will make the virtual machine a real network node, with its full address, without any forwarding, nats and other things.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question