我希望能够在c:\ xampp-scope之外使用别名,如
alias /opt "C:\opt"
Run Code Online (Sandbox Code Playgroud)
在xampp中有一些设置我无法确定,尝试更改用户,添加等,其中没有用,这是一个纯粹的开发环境,那么这里最亲吻的解决方案是什么?
问候,// t
Mel*_*oth 11
您需要有两个条目,一个别名和一个目录.你应该在你的/opt/lampp/etc/extra/httpd-xampp.conf(条目源),看起来像下面的代码块之一.某些配置选项已更改,更多信息可在文档中从2.2升级到2.4
Apache 2.2配置:
Alias /opt/ "C:/opt/"
<Directory "C:/opt">
Options Indexes FollowSymLinks MultiViews ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
Run Code Online (Sandbox Code Playgroud)
Apache 2.4配置:
Alias /opt/ "C:/opt/"
<Directory "C:/opt">
Options Indexes FollowSymLinks MultiViews ExecCGI
AllowOverride All
Require all granted
</Directory>
Run Code Online (Sandbox Code Playgroud)
Alias部分定义了虚拟目录和真实目录的位置.在此示例中,website.com/opt/(或localhost/opt)将指向硬盘驱动器上的C:/ opt.
目录部分定义了apache应如何处理从此位置提供的内容,它将像任何其他Directory条目一样运行,因此从根条目中复制一个并使它们相似可能是个好主意.
这还需要启用mod_alias,检入httpd-xampp.conf并确保没有注释掉它的条目.对conf文件进行任何更改后,您需要重新启动apache才能使更改生效.
| 归档时间: |
|
| 查看次数: |
13179 次 |
| 最近记录: |