小编Jan*_*eVi的帖子

Lion 上的 MAMP PRO:为什么我在 httpd-vhosts.conf 中看不到任何更改?

在 MAMP PRO (os x lion) 中添加本地虚拟主机后,一切正常。出于好奇,我查看了放置在 MAMP/conf/apache/extra 中的 httpd-vhosts.conf 文件,令我惊讶的是,这就是我所能看到的:

<VirtualHost *:80>
    ServerAdmin webmaster@dummy-host.example.com
    DocumentRoot "/Applications/MAMP/Library/docs/dummy-host.example.com"
    ServerName dummy-host.example.com
    ServerAlias www.dummy-host.example.com
    ErrorLog "logs/dummy-host.example.com-error_log"
    CustomLog "logs/dummy-host.example.com-access_log" common
</VirtualHost>

<VirtualHost *:80>
    ServerAdmin webmaster@dummy-host2.example.com
    DocumentRoot "/Applications/MAMP/Library/docs/dummy-host2.example.com"
    ServerName dummy-host2.example.com
    ErrorLog "logs/dummy-host2.example.com-error_log"
    CustomLog "logs/dummy-host2.example.com-access_log" common
</VirtualHost>
Run Code Online (Sandbox Code Playgroud)

它没有将我的虚拟主机添加到文件中,我什至没有看到 localhost 的路径(但它有效!)这是否与 MAMP 使用 httpd.conf 模板的事实有关?关于我的虚拟主机的信息存储在哪里?我可以手动添加虚拟主机吗?

httpd hosts mamp

2
推荐指数
1
解决办法
2788
查看次数

标签 统计

hosts ×1

httpd ×1

mamp ×1