阿里云服务器配置虚拟目录

apache虚拟目录:
访问的连接:http://localhost/mnt
但是mnt目录并不在网站根目录下,而在系统其他目录中,这个时候就得做虚拟目录

找到apache的配置文件,加上这么一段代码:

1 Alias /mnt "/mnt"
2 <Directory "/mnt">
3     Options Indexes MultiViews
4     AllowOverride None
5     Order allow,deny
6     Allow from all
7 </Directory>

保存httpd.conf,重启Apache使配置生效。

原文地址:https://www.cnblogs.com/heyijing/p/5028347.html