Good afternoon, there was a problem in setting up the network in the ubuntu server on vm.
- Installed Ubuntu Server 16.04
- Configure Apache2, PHP, MySQL and other services successfully
- In the settings of Wirth Machines put the connection type Bridge
- The file / etc / network / inferfaces is auto inet dhcp
- I can successfully connect to the machine via ssh using the IP address, and also the server works when I access the page from the browser
And here there was a need to set the domain for ip in the hosts file, as well as to configure the connection via ssh, without the need to enter a password.
- I set it in the / etc / network / inferfaces static ip file
In the end, I was able to configure everything I wanted, the domain and ssh works with a bang. But the fact is that I often move with a laptop, and when using the Internet in another place, I have Apache2, not to mention the connection via ssh. And you have to change static ip to make it work again.
I used vagrant before, but refused it due to the fact that some projects still have old PHP versions, not to mention the fact that they are often different (server configurations). This is if used Vagrant globally on the machine. Frankly speaking, I didn’t like it for each project to make a new vagrant, it’s easier for me to make a copy of vdi and to change the small server settings in the system (it takes less time and body movements).
In Vagrant, I liked that by default there is something 192.168.10.10 to which the connection always goes, and from different places wherever I go to this address with a bang. Tell me please, how can I set up a Wirth machine in the same way, in order to register a static ip at my discretion, and always access it from different places? As I understand it, Host-only can give such an opportunity, but it cuts off access to the network in the Wirth machine and leaves only local.
I would be very grateful for the help, as it is already the second day that I have been struggling with a problem and in no way come to a solution.
PS I use OSX (Macbook pro), all of a sudden it matters