how can I see my apache web server
how can I see my apache web server
Hello, I have one virtual machine (Debian Lenny) running under Windows Vista (host).
On my VM I have Apache Web Server installed. Inside the VM, typing http://10.0.2.15/ or http://localhost/ in the web browser I can access my webpage. But how can I access it from my HOST? If I type the same address in the HOST doesn't work.
I have one folder (C:\Users\Advocacia SA\Downloads) between these two systems (host and guest), where I can see the files by the dir. /mnt/Downloads.
Somethings that maybe can help:
(FROM MY HOST):
C:\Users\Advocacia SA>ipconfig
Configuração de IP do Windows
Adaptador Ethernet Conexão local:
Sufixo DNS específico de conexão . :
Endereço IPv6 de link local . . . . . : fe80::759c:a024:988b:b86%8
Endereço IPv4. . . . . . . . . . : 192.168.1.6
Máscara de Sub-rede . . . . . : 255.255.255.0
Gateway Padrão . . . . . . . . : 192.168.1.1
(FROM THE GUEST):
eth0 Link encap:Ethernet Endereço de HW 08:00:27:3f:52:eb
inet end.: 10.0.2.15 Bcast:10.0.2.255 Masc:255.255.255.0
(...)
network settings is marked as NAT in virtualbox.
Sorry about this english...
I have looked for documentation on my language for this problem but I didn't find, and there isn't good forums about virtualbox in my language too... however, thanks!
On my VM I have Apache Web Server installed. Inside the VM, typing http://10.0.2.15/ or http://localhost/ in the web browser I can access my webpage. But how can I access it from my HOST? If I type the same address in the HOST doesn't work.
I have one folder (C:\Users\Advocacia SA\Downloads) between these two systems (host and guest), where I can see the files by the dir. /mnt/Downloads.
Somethings that maybe can help:
(FROM MY HOST):
C:\Users\Advocacia SA>ipconfig
Configuração de IP do Windows
Adaptador Ethernet Conexão local:
Sufixo DNS específico de conexão . :
Endereço IPv6 de link local . . . . . : fe80::759c:a024:988b:b86%8
Endereço IPv4. . . . . . . . . . : 192.168.1.6
Máscara de Sub-rede . . . . . : 255.255.255.0
Gateway Padrão . . . . . . . . : 192.168.1.1
(FROM THE GUEST):
eth0 Link encap:Ethernet Endereço de HW 08:00:27:3f:52:eb
inet end.: 10.0.2.15 Bcast:10.0.2.255 Masc:255.255.255.0
(...)
network settings is marked as NAT in virtualbox.
Sorry about this english...
I have looked for documentation on my language for this problem but I didn't find, and there isn't good forums about virtualbox in my language too... however, thanks!
-
stephanecharette
- Volunteer
- Posts: 300
- Joined: 10. Nov 2007, 22:03
- Primary OS: Ubuntu other
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Ubuntu-64bit, Windows
- Location: Kelowna, British Columbia, Canada
- Contact:
Download & read the VB user manual.
If you want to keep using NAT, then look at:
"Configuring port forwarding with NAT", section 6.4.1
VB 2.1: page 79
VB 2.0.6: page 74
Otherwise, other alternatives exist such as bridge networking, which if I understand correctly (haven't tried it yet) is much easier to setup in VB 2.1.
Stéphane Charette
If you want to keep using NAT, then look at:
"Configuring port forwarding with NAT", section 6.4.1
VB 2.1: page 79
VB 2.0.6: page 74
Otherwise, other alternatives exist such as bridge networking, which if I understand correctly (haven't tried it yet) is much easier to setup in VB 2.1.
Stéphane Charette
I run these commands on my Windows (host), and everything right.
VBoxManage setextradata "Debian" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/seamlessrdp/UDP" 0
VBoxManage setextradata "Debian" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/seamlessrdp/GuestPort" 80
VBoxManage setextradata "Debian" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/seamlessrdp/HostPort" 3389
now, how can I see my apache web server?
VBoxManage setextradata "Debian" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/seamlessrdp/UDP" 0
VBoxManage setextradata "Debian" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/seamlessrdp/GuestPort" 80
VBoxManage setextradata "Debian" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/seamlessrdp/HostPort" 3389
now, how can I see my apache web server?
I tried http://10.0.2.15:3389/ and didn't work... = (
-
stephanecharette
- Volunteer
- Posts: 300
- Joined: 10. Nov 2007, 22:03
- Primary OS: Ubuntu other
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Ubuntu-64bit, Windows
- Location: Kelowna, British Columbia, Canada
- Contact:
Is your host address really 10.0.2.15? Or did you mix up your guest's IP on the internal VB network?grownler wrote:I tried http://10.0.2.15:3389/ and didn't work...
Otherwise, from the host, try http://localhost:3389/
Stéphane
sorry! I made wrong, I just copy&paste some commands, but now I deleted the modifications of these commands on my XML file from my VM and did:
VBoxManage setextradata "Debian" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/guestapache/TCP"
VBoxManage setextradata "Debian" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/guestapache/GuestPort" 80
VBoxManage setextradata "Debian" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/guestapache/HostPort" 8080
I think it's right now. But keep don't working. And now I tried: http://localhost:8080/ on the host... in the guest I access normally by http://localhost/
Look at somethings of my xml file:
<ExtraData>
<ExtraDataItem name="GUI/SaveMountedAtRuntime" value="yes"/>
<ExtraDataItem name="GUI/LastCloseAction" value="powerOff"/>
<ExtraDataItem name="GUI/LastWindowPostion" value="8,28,720,443"/>
<ExtraDataItem name="GUI/Fullscreen" value="off"/>
<ExtraDataItem name="GUI/Seamless" value="on"/>
<ExtraDataItem name="GUI/AutoresizeGuest" value="on"/>
<ExtraDataItem name="VBoxInternal/Devices/pcnet/0/LUN#0/Config/guestapache/GuestPort" value="80"/>
<ExtraDataItem name="VBoxInternal/Devices/pcnet/0/LUN#0/Config/guestapache/HostPort" value="8080"/>
<ExtraDataItem name="GUI/InfoDlgState" value="400,450,normal"/>
</ExtraData>
VBoxManage setextradata "Debian" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/guestapache/TCP"
VBoxManage setextradata "Debian" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/guestapache/GuestPort" 80
VBoxManage setextradata "Debian" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/guestapache/HostPort" 8080
I think it's right now. But keep don't working. And now I tried: http://localhost:8080/ on the host... in the guest I access normally by http://localhost/
Look at somethings of my xml file:
<ExtraData>
<ExtraDataItem name="GUI/SaveMountedAtRuntime" value="yes"/>
<ExtraDataItem name="GUI/LastCloseAction" value="powerOff"/>
<ExtraDataItem name="GUI/LastWindowPostion" value="8,28,720,443"/>
<ExtraDataItem name="GUI/Fullscreen" value="off"/>
<ExtraDataItem name="GUI/Seamless" value="on"/>
<ExtraDataItem name="GUI/AutoresizeGuest" value="on"/>
<ExtraDataItem name="VBoxInternal/Devices/pcnet/0/LUN#0/Config/guestapache/GuestPort" value="80"/>
<ExtraDataItem name="VBoxInternal/Devices/pcnet/0/LUN#0/Config/guestapache/HostPort" value="8080"/>
<ExtraDataItem name="GUI/InfoDlgState" value="400,450,normal"/>
</ExtraData>
I'm having the same problem. I set the ports to forward from my Host OS (Windows XP) to my Guest OS (Ubuntu server 8.04), but I still can't access from my Host. (Using VBox 2.1.0)
netstat on host and guest show that the ports are open and listening (and that they were closed before I set up the port forward).
I can access the server from within the Guest OS using `wget http://localhost/`. But if I try to access it from the Host OS using http://localhost:8888/`, I get "Failed to Connect" from Firefox.
I get the same problem with SSH (although I haven't tried ssh localhost, that just seems like a bad idea...)
Additionally, I can access the internet from within the Guest OS.
I set up the Windows Firewall to open up the port. No help.
Any ideas what is going on? I have heard whispers that old versions of VBox require you to set up a network bridge or something. Is that what I should be looking at next?
netstat on host and guest show that the ports are open and listening (and that they were closed before I set up the port forward).
I can access the server from within the Guest OS using `wget http://localhost/`. But if I try to access it from the Host OS using http://localhost:8888/`, I get "Failed to Connect" from Firefox.
I get the same problem with SSH (although I haven't tried ssh localhost, that just seems like a bad idea...)
Additionally, I can access the internet from within the Guest OS.
I set up the Windows Firewall to open up the port. No help.
Any ideas what is going on? I have heard whispers that old versions of VBox require you to set up a network bridge or something. Is that what I should be looking at next?
-
TerryE
- Volunteer
- Posts: 3572
- Joined: 28. May 2008, 08:40
- Primary OS: Ubuntu other
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Ubuntu 10.04 & 11.10, both Svr&Wstn, Debian, CentOS
- Contact:
There is a bug in 2.1.0 NAT port forwarding, but since the Host IF model is now very much like the VMWare on (you just select Host IF in the setttings and VBox does everything else), I've pretty much stopped using NAT for my LAMP guest VMs.
Read the Forum Posting Guide
Google your Q site:VirtualBox.org or search for the answer before posting.
Google your Q site:VirtualBox.org or search for the answer before posting.
Cool, so the manual pretty much says what you said: "Turn on Host Interface and you're done"
But it's not working. Now my port forwards are gone, and no new ports are opened up. I can access http://localhost/ from within my guest os (Ubuntu) but not from my host os (Win xp).
What should be the expected functionality? Should I be able to just go to http://localhost/ from my host OS? ie~ should i be using a different port to access it from my host, or should it be the same port?
I tried removing the old port forwarding settings, rebooted the guest os, but I still can't access ssh or http. Any ideas?
But it's not working. Now my port forwards are gone, and no new ports are opened up. I can access http://localhost/ from within my guest os (Ubuntu) but not from my host os (Win xp).
What should be the expected functionality? Should I be able to just go to http://localhost/ from my host OS? ie~ should i be using a different port to access it from my host, or should it be the same port?
I tried removing the old port forwarding settings, rebooted the guest os, but I still can't access ssh or http. Any ideas?
-
Sasquatch
- Volunteer
- Posts: 17798
- Joined: 17. Mar 2008, 13:41
- Primary OS: Debian other
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Windows XP, Windows 7, Linux
- Location: /dev/random
What is the IP of the Guest? Use that in the browser from the Host.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org
Retired from this Forum since OSSO introduction.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org
Retired from this Forum since OSSO introduction.
-
jhardin
- Posts: 1
- Joined: 22. Feb 2011, 17:19
- Primary OS: MS Windows 7
- VBox Version: OSE other
- Guest OSses: xubuntu
Re: how can I see my apache web server
What I found fixed the issue for me was making sure that the windows VirtualHost-Only adapter was set to the .1 address for the ip range so my virtual box host only adapter was 192.168.58.20 but the ip for the Windows adapter is 192.168.58.1