0

I have a requirement where i need to set up PMA on Ubuntu which is installed inside windows server through VM. I have installed it and it is working fine in Ubuntu. but i want to use phpMyAdmin and other applications from different systems of LAN network.

I have configured sites enabled default file but i am not able to access it from different system. There are two ip addresses it is showing on windows it is showing 1.2.3.4 as the ip address of virtual box and when i see the network setting of Ubuntu it is showing 5.6.7.8 as its ip address.

Now the problem is that when i use 1.2.3.4 ip address it is showing IIS server which is installed on windows and when i configure the default file in sites enabled according to 5.6.7.8 then i am able to use it only in Ubuntu not from other system not even from windows server where Ubuntu is installed.

Kindly suggest any solution

1 Answer 1

0

First of all disable IIS because it is using port 80 which is the same port the apache inside the VM is using.

Secondly look into NAT configuration and make sure you're exporting port 80 from the VM as port 80 of the host.

Thirdly you may want to use Vagrant, it's a VirtualBox command line VM manager with a lot of bells and whistles. If you'll want to try Vagrant I'll post a Vagrantfile so you can get started quickly.

Vagrantfile

# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant::Config.run do |config|
    #     Specify the virtual machine base box file. This box file
    # is actually a compressed VMDK file with some aditional
    # settings.
    #     The one specified here is a default Ubuntu Lucid Lynx
    # 32bit install but you can find many others online. The url is
    # external (HTTP) because Vagrant cand download this box if you
    # don't already have it
    config.vm.box = "MyVM"
    config.vm.box_url = "http://files.vagrantup.com/lucid32.box"

    #     Tells VirtualBox to not open a GUI, it helps you avoid 
    # having a window for VirtualBox and another window for the VM.
    #     For server management windows are not necessary you can
    # connect to the VM using SSH (putty for example).
    config.vm.boot_mode = :headless

    #     In this section every pair of parameters is a VBoxManage
    # parameter/value configuration.
    config.vm.customize [
        "modifyvm", :id, 

        #     Specify the virtual machine name you want to see in
        # VirtualBox
        "--name", "MyVM",

        #     Memory for the VM
        "--memory", "2048",

        #     This fixes a bug that makes the guest not have DNS
        # proper access and implicitly not internet.
        "--natdnsproxy1", "on",
        "--natdnshostresolver1", "on"
    ]

    #     This forwards port 80 to port 4567
    config.vm.forward_port 80, 4567

    #     This mounts a shared folder between your machine and the
    # VM. The host directory is the current working directory (the
    # one you have put your Vagrantfile in). The directory is
    # mounted inside the guest as /vagrant
    config.vm.share_folder "v-root", "/vagrant", "."
end
5
  • i have changed the port address of Apache in Ubuntu i changed it to 85. even after Stopping IIS it is not working.
    – Raul
    Jan 11, 2013 at 10:25
  • If you changed the guest port of apache to 85 then you don't need to stop IIS. But you still need to forward guest port 85 to host port 85. Jan 11, 2013 at 10:27
  • yeah sure i would like to use Vagrant. Thanks for sharing this. one more thing i want to ask how to look into NAT configuration?
    – Raul
    Jan 11, 2013 at 10:39
  • I haven't done NAT configuration in VirtualBox in a while but it think it's in the MyVM > Settings > Network section, you select the network interface that handles guest-host communication (usually vboxnet0) and click on Advanced then click on Port forwarding and add the desired settings. Jan 11, 2013 at 10:44
  • In Vagrant you just specify one line in the config file. Jan 11, 2013 at 10:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.