开发者

How can I connect to localhost from a virtual machine?

开发者 https://www.devze.com 2023-01-18 03:03 出处:网络
I\'m running some virtual machines using VMware workstation on my PC (using win 7), also I\'m using a basic WAMP installation. I\'m trying 开发者_Python百科to connect to my Win7 Apache server from any

I'm running some virtual machines using VMware workstation on my PC (using win 7), also I'm using a basic WAMP installation. I'm trying 开发者_Python百科to connect to my Win7 Apache server from any of the VMs. I tried changing the following line on my httpd.conf file:

<Directory "c:/wamp/www/">
    Options Indexes FollowSymLinks
    AllowOverride all
    Order Deny,Allow
    Allow from all ## Was Deny from all
    Allow from 127.0.0.1
</Directory>

This way if I go into my VM browser and type "http://my-ip/Project" I can open the project but I can't see the images or css styles, I think I'm missing some permissions somewhere, also I don't think allowing from all is the most secure way of doing this.

Does anyone know how should I do this?

Thanks in advance!


Apply the NAT addresses of the VMs to the "Allow from" clause in httpd.conf. 127.0.0.1 refers to your localhost. The VMs are not localhost's as far as Apache is concerned. They're PCs on a virtual network.

0

精彩评论

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