Apache 其他系统没有选择lamp ip地址
我有一个要求,我需要在Ubuntu上设置PMA,它通过VM安装在windows服务器中。我已经安装了它,它在Ubuntu中运行良好。但是我想使用phpMyAdmin和其他来自不同局域网系统的应用程序 我已将站点配置为启用默认文件,但无法从其他系统访问它。它在windows上显示了两个ip地址,它显示为虚拟盒的ip地址Apache 其他系统没有选择lamp ip地址,apache,windows-server-2008,lamp,ubuntu-12.04,Apache,Windows Server 2008,Lamp,Ubuntu 12.04,我有一个要求,我需要在Ubuntu上设置PMA,它通过VM安装在windows服务器中。我已经安装了它,它在Ubuntu中运行良好。但是我想使用phpMyAdmin和其他来自不同局域网系统的应用程序 我已将站点配置为启用默认文件,但无法从其他系统访问它。它在windows上显示了两个ip地址,它显示为虚拟盒的ip地址1.2.3.4,当我看到Ubuntu的网络设置时,它显示为其ip地址5.6.7.8 现在的问题是,当我使用1.2.3.4ip地址时,它显示的是安装在windows上的IIS服务器,当
1.2.3.4
,当我看到Ubuntu的网络设置时,它显示为其ip地址5.6.7.8
现在的问题是,当我使用1.2.3.4
ip地址时,它显示的是安装在windows上的IIS服务器,当我在根据5.6.7.8
启用的站点中配置默认文件时,我只能在Ubuntu中使用它,而不能从其他系统使用,甚至不能从安装了Ubuntu的windows服务器使用它
请建议任何解决方案首先禁用IIS,因为它使用的是端口80,这与虚拟机中apache使用的端口相同 其次,查看NAT配置,确保将端口80从VM导出为主机的端口80 第三,您可能想使用它,它是一个VirtualBox命令行虚拟机管理器,具有很多功能。如果您想尝试
Vagrant
,我会发布一个Vagrant文件
,这样您可以快速开始
流浪汉档案
我在Ubuntu中更改了Apache的端口地址,我将其更改为85。即使在停止IIS之后,它也不工作。如果您将apache的来宾端口更改为85,则不需要停止IIS。但您仍然需要将来宾端口85转发到主机端口85。是的,我当然想使用Vagrant。谢谢分享。还有一件事我想问一下如何查看NAT配置?我已经有一段时间没有在VirtualBox中进行NAT配置了,但它认为是在
MyVM>Settings>Network
部分,您选择处理来宾-主机通信的网络接口(通常是vboxnet0
)然后单击Advanced
,然后单击端口转发
,添加所需设置。在Vagrant中,您只需在配置文件中指定一行即可。
# -*- 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