Answer the question
In order to leave comments, you need to log in
Apache installation on Ubuntu (virtual machine). How to access it from the internet?
Hello.
I started my acquaintance with Ubuntu Server by installing it on a VirtualBox virtual machine.
I had never dealt with Linux or virtual machines before, so a lot of questions arose.
Installed LAMP sudo tasksel install lamp-server
After that, as far as I understand, by typing my ip in the browser, I should see some Apache page.
I don't see anything like that. Ping also didn't work.
There is an Internet connection on the virtual machine. I installed the speedtest utility - it shows a good upload and download speed.
Maybe I'm doing something wrong or you can't knock on yourself via the Internet?
Answer the question
In order to leave comments, you need to log in
Change the network adapter to a bridge in the VM settings, you will be on the same network and take the server away
To do this, you need to find out the IP address of your virtual machine. It is different from the address of your computer. In her console, look at the output of the command:
The response will be something like this:
eth1 Link encap:Ethernet HWaddr 08:00:27:ec:61:85
inet addr:192.168.56.10 Bcast:192.168.56.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:feec:6185/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:14107 errors:0 dropped:0 overruns:0 frame:0
TX packets:10207 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1210268 (1.2 MB) TX bytes:2457724 (2.4 MB)
inet addr:192.168.56.10
? So, 192.168.56.10
this is the address of your virtual machine. In order not to enter it manually every time, you can register it in hosts : ubuntu.local
.
After executing the command
I got a response
enp0s3 Link encap:Ethernet HWaddr 08:00:27:4a:99:af
inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe4a:99af/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:30133 errors:0 dropped:0 overruns:0 frame:0
TX packets:17280 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:36142106 (36.1 MB) TX bytes:24837533 (24.8 MB)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question