How to configure multiple virtual hosts for MAMP Free version - mamp

I've followed several articles about how to configure virtual hosts on Mac using MAMP (such as this post) which involve editing three files:
/etc/hosts
Applications/MAMP/conf/apache/httpd.conf
Applications/MAMP/conf/apache/extra/httpd-vhosts.conf
That all works fine for one host at a time, but if I configure a second local site (such as mysite.loc), the second site doesn't work: it redirects to which ever one I've pointed the directory to in MAMP free. I know that in XAMPP it would be fine to have several different virtual hosts, but shouldn't this also work with MAMP free? If so, how?

you can try to change the port number for all the virtual hosts in the httpd-vhosts.conf file to the one your apache server is currently using. so those virtual hosts can start utilizing the directories you specified, instead of using the default one that can only be changed in the app.

Related

Re-mapping localhost in Windows on Parallels for Mac

I have just started using Parallels for Mac, and am attempting to debug a locally running web application on my host MacOS machine.
I have figured out that I can connect to the my host via 10.211.55.2 in the browser in my virtual windows machine.
What I'd like to do is to instead connect via localhost and have this routed through to the 10.211.55.2 ip instead.
I tried editing my windows hosts file with an 10.211.55.2 localhost entry but this made no difference.
Is this possible to do?
localhost is hardcoded in many libraries. In theory it should be possible, but it would break a lot of things, including not being able to boot up the system. Connections to localhost are used frequently for interprocess communication throughout the system, so there's more to it then you using it for testing websites. Just go with another name.

LAMP virtual machine as a real 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.

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

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.

Viewing a local web site on the LAN under a different hostname

In short I'm trying to browse a Mac's web site on the local wifi network under a .local hostname that is not the same as the machine's 'computer name' and think I'm missing a setup step.
I have a local install of nginx on my Macbook, with the proper /etc/hosts and nginx.conf entries to serve multiple sites, each with their own distinct local hostname. Assume the Macbook's network name is computername.local, and I have 2 sites running, one at http://computername.local and another at http://servicename.local. I can access each of these sites just fine from the local machine, but also want to be able to access http://servicename.local from an iPhone on the same WiFi network. I'm getting a timeout for that URL, but the other one works just fine.
I'm guessing something has to be done to allow servicename.local to be used on the local network, which I've left out. What is required to do that? Do I need to use Bonjour for that? Where would I add this new local hostname?
Another Mac on the same network can access this one under servicename.local just fine if I define the IP in its /etc/hosts file too, but I can't modify that file on the iPhone obviously. It's not jailbroken, and I'm not really interested in doing that just to get this working.
Not sure if it will help the OP, but another way of doing this - besides running a DNS server or jailbreaking the phone - is to run an HTTP proxy on the Mac, and configure the iPhone to use the proxy. Then the iPhone will pick up the Mac's local hosts file entries because it resolves DNS queries through the proxy. I've blogged about how to do this using the free Mac proxy "SquidMan" here: http://egalo.com/99j