【绝对能用】阿里云ECS上Centos7安装Apache(httpd)并实现多域名转不同tomcat配置

xiaoxiao2021-02-28  104

#安装 yum install httpd #设置自启 systemctl enable httpd.service #编辑httpd.conf就够了,httpd.conf在/etc/httpd/conf中。在底部加上虚拟主机 vim /etc/httpd/conf/httpd.conf ------------------------------------------------------------------------------- NameVirtualHost *:80       <VirtualHost *:80>       ServerName www.xm10000.com.cn        ServerAlias xm10000.com.cn *.xm10000.com.cn        ProxyPreserveHost On     ProxyRequests Off       ProxyPass / http://www.xm10000.com.cn:81/     ProxyPassReverse / http://www.xm10000.com.cn:81/       ErrorLog logs/xm10000_error_log     CustomLog logs/xm10000_access_log common </VirtualHost> <VirtualHost *:80>       ServerName www.titantec.cn        ServerAlias titantec.cn *.titantec.cn        ProxyPreserveHost On     ProxyRequests Off       ProxyPass / http://www.titantec.cn:82/     ProxyPassReverse / http://www.titantec.cn:82/       ErrorLog logs/titantec_error_log     CustomLog logs/titantec_access_log common </VirtualHost> -------------------------------------------------------------------------------
转载请注明原文地址: https://www.6miu.com/read-25943.html

最新回复(0)