Apache 多个 DocumentRoot [英] Apache multiple DocumentRoot
本文介绍了Apache 多个 DocumentRoot的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在 apache 中进行以下设置?
How can I have the following setup in apache?
http://server/ABC/*
应该由 /var/www/ABC/*
http://server/PQR/*
应该由 /var/www/PQR/*
所有其他请求都应该由 /var/www/Others/index.php
(单个文件)提供.
Every other request should be served by /var/www/Others/index.php
(a single file).
谢谢,
日本
推荐答案
使用别名:
Alias /ABC/ /var/www/ABC/
Alias /PQR/ /var/www/PQR/
让文档根目录指向/var/www/Others/index.php.它可以做到这一点.:)
Leave the document root pointing to /var/www/Others/index.php. It could do the trick. :)
这篇关于Apache 多个 DocumentRoot的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文