1
我試圖創建AMMPS Windows 8的下一個虛擬主機,文件根目錄應該是一個外部硬盤驅動器F下:目錄,這是我的httpd.conf在ampps設置虛擬主機
<VirtualHost 127.0.0.1:80>
<Directory "{$path}/www">
Options FollowSymLinks Indexes
AllowOverride All
Order deny,allow
allow from All
</Directory>
ServerName localhost
ServerAlias localhost 127.0.0.1
ScriptAlias /cgi-bin/ "{$path}/www/cgi-bin/"
DocumentRoot "{$path}/www"
ErrorLog "{$path}/apache/logs/error.log"
CustomLog "{$path}/apache/logs/access.log" combined
</VirtualHost>
<VirtualHost *:80>
<Directory "F:/www">
Options FollowSymLinks Indexes
AllowOverride All
Order deny,allow
allow from All
</Directory>
DocumentRoot "F:/www"
ServerName site1.com
</VirtualHost>
和這是我的hosts文件
127.0.0.1 site1.com
127.0.0.1 site2.com
127.0.0.1 site3.com
127.0.0.1 site4.com
127.0.0.1 site5.com
當我輸入site1.com,我得到默認的虛擬服務器,而不是,是我做錯了嗎?
哇,這工作!非常感謝 – sampity