LOADING

apache路由端口配置

–>

<VirtualHost *:80>
ServerName a.com
ProxyPreserveHost On
ProxyRequests On
ProxyPass / http://127.0.0.1:8003/
ProxyPassReverse / http://127.0.0.1:8003/
</VirtualHost>

<VirtualHost *:80>
ServerName b.com
ServerAlias
ProxyPreserveHost On
ProxyRequests On
ProxyPass / http://127.0.0.1:8005/
ProxyPassReverse / http://127.0.0.1:8005/
</VirtualHost>

<VirtualHost *:80>
ServerName c.com
DocumentRoot /data/cdn/
</VirtualHost>

<Directory “/data/cdn/”>
Options +Includes -Indexes
AllowOverride All
Order Deny,Allow
Allow from All
Require all granted

</Directory>

 

相同端口

<VirtualHost *:80>
ServerName 1.abc.com
ProxyPreserveHost On
ProxyRequests On
ProxyPass / http://127.0.0.1:8003/
ProxyPassReverse / http://127.0.0.1:8003/

CustomLog “| /usr/sbin/rotatelogs var/log/httpd/x_access_log.%Y_%m_%d.log 86400 480” combined
ErrorLog “| /usr/sbin/rotatelogs /var/log/httpd/x_error_log_%Y%m%d.log 86400 480”

</VirtualHost>

<VirtualHost *:80>
ServerName 2.abc.com
ProxyPreserveHost On
ProxyRequests On
ProxyPass / http://127.0.0.1:8003/
ProxyPassReverse / http://127.0.0.1:8003/
</VirtualHost>

<VirtualHost *:80>
ServerName 3.abc.com
ProxyPreserveHost On
ProxyRequests On
ProxyPass / http://127.0.0.1:8003/
ProxyPassReverse / http://127.0.0.1:8003/
</VirtualHost>

原文链接:https://www.cnblogs.com/happyday56/p/9183790.html
本文来源 互联网收集,文章内容系作者个人观点,不代表 本站 对观点赞同或支持。如需转载,请注明文章来源,如您发现有涉嫌抄袭侵权的内容,请联系本站核实处理。

© 版权声明

相关文章