2014-10-29 41 views
1

我在httpd.conf文件添加一個別名在localhost/projects訪問我的文件夾:如何在XAMPP v3.2.1中向Apache添加別名?

<IfModule alias_module> 

    Alias /projects "C:/Users/Ben/Google Drive/Projects" 

    <Directory "C:/Users/Ben/Google Drive/Projects"> 
     Options Indexes FollowSymLinks MultiViews 
     AllowOverride All 
     Order allow,deny 
     Allow from all 
     Require all granted 
    </Directory> 

    ScriptAlias /cgi-bin/ "C:/xampp/cgi-bin/" 

</IfModule> 

當我嘗試在XAMPP 3.2.1沒有啓動Apache被寫入error.log中和Apache無法啓動。

+0

你在哪裏下載XAMPP?它仍然在[版本](https://www.apachefriends.org/download.html)[1.8.3](http://en.wikipedia.org/wiki/XAMPP)中。你是如何得到版本3.2.1? – kums 2014-10-29 06:33:25

+1

很確定他指的是顯示在控制面板窗口中的版本號。 – oomlaut 2014-10-29 19:46:59

+0

是的我指的是控制面板中顯示的版本號。所以最新版本的XAMPP 1.8.3 – Ben 2014-10-30 03:15:50

回答

5

文件: httpd.conf文件(原件)

後:

# Note that from this point forward you must specifically allow 
# particular features to be enabled - so if something's not working as 
# you might expect, make sure that you have specifically enabled it 
# below. 

地說:

<Directory "C:/Users/Ben/Google Drive/Projects"> 
    Options Indexes FollowSymLinks MultiViews 
    AllowOverride All 
    Require all granted 
</Directory> 

Alias /projects "C:/Users/Ben/Google Drive/Projects"