开发者

Running XAMPP on Windows through VMWare Fusion on a MAC, how do I configure apache to use my shared folders (Z:) as the web root?

Environme开发者_运维技巧nt:

Main platform: MAC OSX 10.6

Secondary platform via VMWare Fusion: Windows 7 64-bit

Background: I'm running MAMP Pro on the MAC side with a webroot at "/www". I need to test websites in IE thus requiring a Windows installation. I installed XAMPP on my Windows side and changed the apache root directory to "Z:\www", the location of my MAMP webroot which is a shared folder between MAC and Windows.

When I try to access a local site from windows (http://localhost/asite) I get a 403 Forbidden error:


Access forbidden!

You don't have permission to access the requested object. It is either read-protected or not readable by the server.

If you think this is a server error, please contact the webmaster. Error 403 localhost 07/30/10 14:21:07 Apache/2.2.14 (Win32) DAV/2 mod_ssl/2.2.14 OpenSSL/0.9.8l mod_autoindex_color PHP/5.3.1


What other configuration changes need to be made for this to work if it will work at all?

Thanks,

Chris


Thanks to those who responded. I did a little research on the types of network connections and here's how I resolved the issue without using XAMPP at all.

To recap, I'm running Win7 on my Mac via VMWare Fusion as a virtual machine. I have MAMP running a local web server on my Mac with a webroot at /www and I want to be able to also access the web server from browsers in Windows.

In short, I want to be able to go to http://localhost/mysite from Safari (Mac) or IE (Windows).

  1. Changed my Fusion Network Adapter to Bridged, since I am working from a home office.
  2. Refreshed my network connections using the ipconfig commands in the command prompt.
  3. Edited my windows hosts file to reflect: 192.168.1.102 localhost

Done and done.

I hope someone else can find this useful.

  • Chris


Is there any specific reason you're trying to serve your site from XAMPP, rather than just MAMP? I worked in a similar environment a couple of years ago, and I simply set the virtual machine's networking type to NAT (so that the guest has a different IP from the host), and then pointed IE at the IP address of the host running MAMP.


Maybe I didn't quite understand your problem completely, but:

"I need to test websites in IE"
you don't need to setup a Web server to do that...
Keep using Apache on your Mac host and point IE from your Windows VM to the host machine IP, as peterjmag suggested.
Also, wasn't there a Mac version of IE?

Again, my apologies if i misunderstood you - I don't want to sound arrogant;)

"Z:\www ... a shared folder between MAC and Windows"
What's this - a network share? Do you get the same error if you use a local folder in your VM (eg: C:\www)?

Try mounting /www from your VM - go to it's settings > options tab > shared folders. Select Always Enabled. Click Add and browse to your /www host folder. This should make /www accessible in your VM Windows.

Finally, just in case: check Windows permissions on the www folder.

Hope that helps!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜