LAMP virtual machine as a real server - server

Dummy question here, I'm pretty new to some stuff like setting up server configuration, etc.
So my question is, can i set up a LAMP virtual machine and use it as a real server?
I mean can the web pages in the www directory be accessed from another computer like if it was a regular server??

Simple Answer: Yes
The VM has to have its network interface routed to the host machine to be accessible from host's network.
How this is done depends on the OS and VM software.

Related

How to connect to virtual machine which is considered as the main host server?

I am running openBmc Romulus image on QEMU as given in the tutorials. I want to connect it to another virtual machine which will act as the host complex(main server). So that I can turn it on/off from the BMC session and try various other things.
No one has done this yet to my knowledge.

how to setup web server,application server,db server on multiple vm?

I would like to do my study practice.
To install the multiservers seperating on multiple vm -web server in first vm ,app server in second and db server in the last vm .then,I will create my own webpage to test about accessing data in db .Each of vm is based on VMware in my computer and just do it on localhost environment.not need to connect internet.
How can I do this or Where can I find any Tutorial .Plese give me some suggestion to finish my project ^^"
Thank u very muchh
Just like what you do in physical machines. And IMHO, your question is too general and has nothing to do with virtual machines. I think what you are looking for is how to setup a web server and how to use a database. Why not check the sites such as nginx or apache and mysql or postgresql ?
First of all you need to run all the machines and connected with each other.
By doing this you'll get IP addresses of those machines..
Now simply replace your IP addresses with localhost according to server
Note that every machine must have an appropriate server

VirtualBox VM guest to pop up a window to the host machine

Question mark
I'm wondering whether it's possible for the VM guest machine to pop up a window to the MS-Windows host machine once a task is done within the VM (not an email). If I'm not dreaming, how to achieve that ?
Why
The VM is a simulator for a production server. Code is written within the host IDE and tested straight into the VM. So files are transferred manually from the IDE to the VM, and then automatically moved, formatted, chmoded, chowned and so on in the VM. This process can take a while, so I want to warn the devleopper once the process is over. The developper have no access to the VM and shall not necessary have one.
Config
Tool: VirtualBox 4.1
host: MS-Windows XP or Windows seven
guest: VM Debian
shared dir: yes
network : bridged connection
If this ability existed, it would be quite a security hole in VirtualBox. Guest VMs gaining access to the host machine's OS is not a good thing! As such, I don't think it's possible to accomplish this in a supported manner.
Instead, think of it as two separate machines. What mechanisms do you have for causing alerts or popups on one machine from another? Is anything like IMs, netsend, etc enabled in your environment?

rdp web client of virtualbox

thank you for reading my question.
I want to login the virtual machine romotely through rdpweb shipped with virtualbox sdk.Of course, the virtual machine was installed in the virtualbox.The rdpweb(a folder) contains 4 files, webclient3.html, swfobject.js, webclient.js and RDPClientUI.swf.
Firstly, I copy rdpweb to the /.../tomcat/webapp. So i can visit webclinet3.html now. And there is a image which shows what i get.Sorry, i haven't enough reputation for posting a image.I just can put a link to the image.
http://i.minus.com/jbdHDzjWwQntWQ.PNG
An error happened. Google says that putting the crossdomin.xml to the root of webapp would solve the bug.The bug may be aroused by flash.But it is invalid for me. Why ?
My physical host is win7(ip:192.168.1.107), and my virtual guest is windowsxp(ip:192.168.1.111). The version of the virtualbox is 4.1.8.
Any help would be appreciated!Thank you very much.
I am so sorry for my poor english.
Update:
Your configuration looks like you have configured your WinXP guest with a bridged network adapter, and you are trying to connect directly to it. Have you enabled Remote Desktop on the WinXP guest? Go to the Control Panel -> System applet, then choose the remote tab and be sure to check both boxes to allow remote desktop connections. You will also need to make sure the firewall will allow this connection to the guest.
VirtualBox also have the capability to serve up a virtual machines display over RDP or VNC (VNC in the OSE - Open Source Edition). If you are wanting to use that capability then you should be connecting to the HOST IP address - not the guest. Since your host is Windows 7 you will also need to adjust the Remote Display Server Port for your guest (in the VM Settings in VirtualBox) to use a port besides 3389. I usually pick 3390. Your screenshot doesn't show somewhere you can enter the TCP port, so this approach may not be supported, but you could try appending :3390 to the IP address.
Original Answer:
Could you post the crossdomain.xml file you are currently using? This is almost certainly a problem with it.
My guess is that your crossdomain.xml file should look something like this:
<?xml version="1.0"?>
<!-- http://127.0.0.1:8080/crossdomain.xml -->
<cross-domain-policy>
<allow-access-from domain="192.168.1.111" />
</cross-domain-policy>
You could start with just putting * instead of the IP address in the file as well - though that is generally not recommended as it opens the possibility that the flash player can access any resource on any network. It would make it easier to access other virtual machines you might use in the future with different addresses.

Can I run/access localhost server thru ip and subnet?

Is it possible for me to run a webserver on my computer (shared ip) and access it remotely using my ip + subnet or at least some way that doesn't involve having the IT guys make changes to the machine(s) currently running our virtual servers and/or routing our subnet?
Rationale:
I'm on a computer at work, and I'm making changes to a plugin for Google Website Optimizer. I want GWO to be able to access localhost (i.e. my development environment) so that I don't have to deploy every change to the production server while I'm feeling out the system. (lots of changes; tedious deployment takes up most of the time)
I can't just supply my IP to GWO because that points to our production server (all of our computers at work are on the same IP). If I could construct a URI that points just to my computer, then I suppose I could let GWO view a page on my development environment and interact therewith.
Not only would achieving this purpose be helpful in present circumstances, but it would aid me immensely in that I could let my boss look at what I've got in dev, from his own machine, at his leisure, without deploying changes to production.
I'm not familiar with the Google Website Optimizer, or how/where a plugin for it that you might write would be executed. So I'm going to summarize what I understand about your problem (including some guesses) and go from there, please correct me if I'm wrong.
Your company has one public IP address.
Your workstation and all the hosts on your network are source NAT'ed to the internet.
Port 80 (http) on your public IP address is destination NAT'ed to your production webserver which is hosted as a virtual machine.
You have a development webserver that is hosted on your workstation.
You have reservations about involving your "IT guys" to making routing or system admin changes.
You want your development environment to be accessible from the internet.
First up (assuming everything above is correct):
access it remotely using my ip + subnet - No. Not possible.
Second up:
I could let my boss look at what I've got in dev - Easy, get him to point his browser at your workstation's IP address on your internal network.
Possible solutions for remotely accessible:
Talk to your "IT guys" about getting your dev environment made externally accessible.
Use name-based virtual hosts on your production webserver. Requires setting up a DNS record for the dev site (e.g. dev.your-company) and pointing it to your company's IP address. If SSL is in use this is harder to achieve. You could then:
Proxy requests for a different site name to your workstation (readily achievable with apache).. or
Host your development environment on your production server
Proxy a particular URL path to your workstation. (e.g. /dev/)
Get an unused port (e.g. 8080) on your public IP destination NAT'ed to port 80 on your workstation. Your dev environment URL might then be http://www.your-company:8080/