我一直試圖通過macports升級到最新的PHP後整天搞清楚這一點。雖然現在我有一個奇怪的問題,如果我訪問 http://localhost - 這工作正確的在我的網站/用戶/ FOO顯示的網站列表/站點 http://127.0.0.1 - 這顯示默認「它工作的」127.0.0.1和localhost與macports安裝的雪豹不同
我havw我已經創建了一個虛擬主機文件具有以下
<VirtualHost *>
DocumentRoot "/Users/foo/Sites"
ServerName localhost
ServerAlias 127.0.0.1
ServerAdmin [email protected]
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /Users/foo/Sites>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
ErrorLog /opt/local/apache2/logs/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /opt/local/apache2/logs/access.log combined
</VirtualHost>
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot "/Users/foo/Sites/snow"
ServerName snow.local
ServerAlias www.snow.local
ErrorLog "/opt/local/apache2/logs/snow-error_log"
CustomLog "/opt/local/apache2/logs/snow-access_log" common
</VirtualHost>
我的主機文件包含
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
fe80::1%lo0 localhost
127.0.0.1 snow.local
是的,雖然我設置了虛擬主機,所以我不必在我的個人筆記本電腦上這樣做。 –