Apache配置 虚拟转向实例
程序员文章站
2022-12-25 23:55:10
namevirtualhost *:80 这个一定要 然后把主的serveradmin丢最下面 ///////////////////// namevi...
namevirtualhost *:80 这个一定要
然后把主的serveradmin丢最下面
/////////////////////
namevirtualhost *:80
<virtualhost *:80>
servername abccccc.com
proxypass / http://localhost:8088/
proxypassreverse / http://localhost:8088/
</virtualhost>
#设置虚拟主机
<virtualhost *:80>
serveradmin www.adddd.com
documentroot e:/tomcat/webapps/root
#您的站点项目所在路径,应与tomcat中的目录设置相同
servername www.adddd.com
alias /p "f:\\uploadfiles"
<directory "f:\\uploadfiles">
options -indexes multiviews
allowoverride none
order allow,deny
allow from all
</directory>
alias /aaaaaa "f:\\aaaaaa"
<directory "f:\\aaaaaa\abcc">
options -indexes multiviews
allowoverride none
order allow,deny
allow from all
</directory>
directoryindex index.html index.htm index.jsp
errorlog logs/shsc-error_log.txt
customlog logs/shsc-access_log.txt common
jkmount /servlet/* ajp13
#让apache支持对servlet传送,用以tomcat解析
jkmount /*.jsp ajp13
#让apache支持对jsp传送,用以tomcat解析
jkmount /*.do ajp13
#让apache支持对.do传送,用以tomcat解析
</virtualhost>
/////////////////////
然后把主的serveradmin丢最下面
/////////////////////
namevirtualhost *:80
<virtualhost *:80>
servername abccccc.com
proxypass / http://localhost:8088/
proxypassreverse / http://localhost:8088/
</virtualhost>
#设置虚拟主机
<virtualhost *:80>
serveradmin www.adddd.com
documentroot e:/tomcat/webapps/root
#您的站点项目所在路径,应与tomcat中的目录设置相同
servername www.adddd.com
alias /p "f:\\uploadfiles"
<directory "f:\\uploadfiles">
options -indexes multiviews
allowoverride none
order allow,deny
allow from all
</directory>
alias /aaaaaa "f:\\aaaaaa"
<directory "f:\\aaaaaa\abcc">
options -indexes multiviews
allowoverride none
order allow,deny
allow from all
</directory>
directoryindex index.html index.htm index.jsp
errorlog logs/shsc-error_log.txt
customlog logs/shsc-access_log.txt common
jkmount /servlet/* ajp13
#让apache支持对servlet传送,用以tomcat解析
jkmount /*.jsp ajp13
#让apache支持对jsp传送,用以tomcat解析
jkmount /*.do ajp13
#让apache支持对.do传送,用以tomcat解析
</virtualhost>
/////////////////////