Help about this scenario.

19 views
Skip to first unread message

hack...@yahoo.com

unread,
Apr 20, 2019, 2:51:27 AM4/20/19
to Vagrant
Hello.
I installed Vagrant on Debian 9 x86_64 and added a "ubuntu/trusty64" box. I want to configure "Nginx" on "ubuntu/trusty64". I installed Nginx and added below line to "Vagrantfile" : 

config.vm.network "private_network", ip: "192.168.1.10"

and turn VM off and on. My "ubuntu/trusty64" network config is:

eth0      Link encap:Ethernet  HWaddr 08:00:27:cd:72:b7  
          inet addr:10.0.2.15  Bcast:10.0.2.255  Mask:255.255.255.0
          inet6 addr: fe80::a00:27ff:fecd:72b7/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:584 errors:0 dropped:0 overruns:0 frame:0
          TX packets:491 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:71452 (71.4 KB)  TX bytes:77530 (77.5 KB)

eth1      Link encap:Ethernet  HWaddr 08:00:27:bc:9a:e1  
          inet addr:192.168.1.10  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::a00:27ff:febc:9ae1/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:16 errors:0 dropped:0 overruns:0 frame:0
          TX packets:24 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:1112 (1.1 KB)  TX bytes:2068 (2.0 KB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

And the host (Debian) network is as below:

ens192: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 172.20.100.64  netmask 255.255.0.0  broadcast 172.20.255.255
        inet6 fe80::20c:29ff:fe9a:d52b  prefixlen 64  scopeid 0x20<link>
        ether 00:0c:29:9a:d5:2b  txqueuelen 1000  (Ethernet)
        RX packets 278924  bytes 493487802 (470.6 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 197133  bytes 16369643 (15.6 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1  (Local Loopback)
        RX packets 9715  bytes 1298850 (1.2 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 9715  bytes 1298850 (1.2 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

vboxnet0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.1  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::800:27ff:fe00:0  prefixlen 64  scopeid 0x20<link>
        ether 0a:00:27:00:00:00  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 66  bytes 4932 (4.8 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

vboxnet3: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 192.168.33.1  netmask 255.255.255.0  broadcast 192.168.33.255
        inet6 fe80::800:27ff:fe00:3  prefixlen 64  scopeid 0x20<link>
        ether 0a:00:27:00:00:03  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 57  bytes 4778 (4.6 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0


Then I edited "nano /etc/hosts" file and added below line:

192.168.1.10  lemp

But when I navigate to the host IP address(172.20.100.64) then I can't see Nginx.
How can I solve it?

Thank you.

Alvaro Miranda Aguilera

unread,
Apr 20, 2019, 2:58:55 PM4/20/19
to vagra...@googlegroups.com
hello

check os manual documentation, you may need to install the package, enable the service, start the service.


--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/17e21560-25a3-461e-9914-056c5601cfb8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Alvaro

Jim McGinness

unread,
Apr 20, 2019, 4:29:35 PM4/20/19
to Vagrant
What you installed was a "base box"; it requires additional configuration for turning it into, say, a LEMP box. I think you would want to consider starting with a box that has already installed and configured the basic setup for LEMP. One possibility is at:


while a more completely kitted out one is at


I recommend searching at https://app.vagrantup.com/boxes/search using search terms for the application suite you want to use; you will likely save a lot of time by letting someone else put together the application suite you want to use.

If you're using Vagrant for one-time installations, you need to realize that you're somewhat out of the sweet spot for what Vagrant is good at: repeatable deployment of throw-away test environments. And for your next step, you'll need to become familiar with the shell provisioner and possibly something like Ansible.


   
Reply all
Reply to author
Forward
0 new messages