问题描述
我有一个问题,MAMP。
I got a problem with MAMP.
我在httpd-vhosts.conf添加code的这些行:
I added in the httpd-vhosts.conf these lines of code:
<VirtualHost *:80>
ServerName "site1.dev"
DocumentRoot "/Users/kevingorjan/site1/public_html/"
<Directory "/Users/kevingorjan/site1/public_html/">
Options All
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerName "site2.dev"
DocumentRoot "/Users/kevingorjan/site2/public_html/"
<Directory "/Users/kevingorjan/site2/public_html/">
Options All
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
和我更新了我的/ etc / hosts文件
And I updated my /etc/hosts
127.0.0.1 site1.dev
127.0.0.1 site2.dev
当我冲浪site1.dev。一切都如预期。这些服务器加载指定到该URL正确的内容。但是,当我冲浪site2.dev,我会收到来自site1.dev相同的内容。有没有办法,我想还是我不得不改变在配置一些别的东西吗?
When I surf to site1.dev. Everything goes as expected. The servers loads the correct content specified to this URL. But when I surf to site2.dev, I'll receive the same content from site1.dev. Is there something that I miss or do I have to change something else in the configuration?
在此先感谢
*解决方案*
对不起,我发现这个问题。
我的工作我的Mac,我已经运行Apache,而我的甲基苯丙胺也运行。我删除了我的机器上安装的Apache,现在一切工作正常。
谢谢
推荐答案
对不起,我发现这个问题。
Sorry, I found the problem.
我的工作我的Mac和我有正在运行Apache,而我的甲基苯丙胺也运行。
我删除了Apache我的机器上,现在一切工作正常。
I'm working on my Mac and I have apache running while my MAMP is also running.I removed the apache on my machine and now everything is working fine.
感谢
这篇关于MAMP虚拟主机选择错误的目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!