二级域名指向到一个访问地址的问题
用SSH做了一个网站,现有域名xxx.com,服务器是TOMCAT,网站其中一个模块的访问地址是www.xxx.com/aaa/bbb!ccc,现在想做个二级域名yyy.xxx.com直接指向到www.xxx.com/aaa/bbb!ccc这个地址,请问大师们应该怎么做?
------解决方案--------------------这要用到 apache 的 virtualhost
NameVirtualHost *:80
<VirtualHost *:80>
ServerAdmin webmaster@xxx.com
DocumentRoot /路径(aaa/xxx)
ServerName www.xxx.com
ErrorLog logs/xxx-error_log
CustomLog logs/xxx-error_log common
</VirtualHost>
<VirtualHost *:80>
ServerAdmin webmaster@xxx.com
DocumentRoot /路径(aaa/bbb!ccc)
ServerName yyy.xxx.com
ErrorLog logs/xxx-error_log
CustomLog logs/xxx-error_log common
</VirtualHost>