2013-10-13 50 views
4

XAMPP的Windows 1.8.2 PHP 5.4, 操作系統:Windows XP設置虛擬主機的XAMPP在Windows

我使用的用戶名和passowrd上XAMPP

C:\ WINDOWS \ SYSTEM32 \ DRIVERS \等\主機 127.0.0.1 hindustans.local 127.0.0.1 read.local

E:\我的項目\ wesites \讀 的index.html

的httpd-vhosts.conf

<Directory "E:/My Projects/wesites/read"> 
    Options Indexes FollowSymLinks 
    AllowOverride All 
    Order allow,deny 
    Allow from all 
    </Directory> 

    <VirtualHost *:80> 
    DocumentRoot "C:/xampp/htdocs" 
    ServerName localhost 
    </VirtualHost> 
    <VirtualHost *:80> 
    DocumentRoot "E:/My Projects/wesites/read" 
    ServerName read 
    Options +Indexes 
    </VirtualHost> 

read.local用C正常工作:\ XAMPP \ htdocs中 但 read.local不與評估工作:\我的項目\ wesites \讀\ index.html在

我想簡要運行基於E我的項目:\我的項目\ wesites \讀

+0

你能訪問你的文件夾嗎?你有權這樣做嗎?你有索引文件嗎?另外,你爲什麼要在Windows XP上託管網站? –

回答

0

您需要相匹配的服務器名稱的地址,你的主機有,並給它的權限

<VirtualHost *:80> DocumentRoot "E:/My Projects/wesites/read" ServerName read.local <Directory "E:/My Projects/wesites/read" > Options Indexes FollowSymLinks Includes ExecCGI Order allow,deny Allow from all </Directory> </VirtualHost>

然後嘗試訪問該網站在read.local。

更多信息here