我有一台使用 Linux 的机器,另一台使用 MacOsX:前者用于 Web 开发,后者用于 iOS 开发。我只想开始使用我的 MacBook 进行 Web 开发并停止拥有两台机器。我不喜欢虚拟机。
(PS。如果可以的话,我不想安装任何像MAMP这样的软件)
所以,...我已经激活了 apache2,我已经定义了一个 VirtualHost:
<VirtualHost *:80>
ServerAdmin sensorario@gmail.com
ServerName localhost
ServerAlias senso.local.com
DocumentRoot /Users/simonegentili/Development/Www
DirectoryIndex index.php
<Directory /Users/simonegentili/Development/Www>
AllowOverride all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/localhost.error.log
LogLevel notice
CustomLog ${APACHE_LOG_DIR}/localhost.access.log combined
</VirtualHost>
还有这个 DocumentRoot:
DocumentRoot "/Users/simonegentili/Development/Www/"
但我只看到这样的消息:
Oops! Google Chrome could not connect to localhost