网站二级域名配置物理路径,配置访问网站的根目录下的文件如:js,css,images等
<VirtualHost *:80>
# 访问物理路径配置
DocumentRoot "D:/public_html/m"
ServerName m.tj.cn
<Directory "D:/public_html/m">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
#其中images 是虚拟目录名,D:/public_html/images为物理路径名。
Alias /images "D:/public_html/images"
<Directory D:/public_html/images>
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
#其中css 是虚拟目录名,D:/public_html/css 为物理路径名。
Alias /css "D:/public_html/css"
<Directory D:/public_html/css>
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
#其中js 是虚拟目录名,D:/public_html/js 为物理路径名。
Alias /js "D:/public_html/js"
<Directory D:/public_html/js>
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
#其中img 是虚拟目录名,D:/public_html/img 为物理路径名。
Alias /img "D:/public_html/img"
<Directory D:/public_html/img>
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
感觉配置的虚拟目录写的太过繁琐,不知还有没有简便的写法,有知道其他写法的还请留言告知,大家多多交流,感谢!!