如何在XAMPP v3.2.1中为Apache添加别名? [英] How can I add an alias to Apache in XAMPP v3.2.1?
本文介绍了如何在XAMPP v3.2.1中为Apache添加别名?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在httpd.conf
文件中添加了一个别名,以访问localhost/projects
处的文件夹:
I have added an alias in the httpd.conf
file to access my folder at localhost/projects
:
<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时,没有任何内容写入错误日志,并且Apache无法启动.
When I try to start Apache in XAMPP 3.2.1 nothing is written to the error.log and Apache fails to start.
推荐答案
文件: httpd.conf(原始)
File: httpd.conf (original)
之后的:
# 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"
这篇关于如何在XAMPP v3.2.1中为Apache添加别名?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文