如何使用反向代理在Apache2上区分不同的协议?
我需要用Apache设置一个反向代理。 远程网站使用https和Web套接字安全wss 我用以下方式配置了Apache Web服务器版本2.2.22:如何使用反向代理在Apache2上区分不同的协议?,apache,https,websocket,reverse-proxy,Apache,Https,Websocket,Reverse Proxy,我需要用Apache设置一个反向代理。 远程网站使用https和Web套接字安全wss 我用以下方式配置了Apache Web服务器版本2.2.22: Listen 8443 <IfModule mod_websocket.c> <IfModule mod_proxy.c> SSLProxyEngine On <VirtualHost *:80> ServerAdmin webmaster@localhost Documen
Listen 8443
<IfModule mod_websocket.c>
<IfModule mod_proxy.c>
SSLProxyEngine On
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www
<Location />
ProxyPass https://10.0.3.100/
ProxyPassReverse https://10.0.3.100/
</Location>
<Location /dp/redirect>
ProxyPass https://10.0.3.100/
ProxyPassReverse https://10.0.3.100/
</Location>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
<VirtualHost *:8443>
ServerAdmin webmaster@localhost
SSLEngine on
SSLCertificateFile /etc/apache2/ssl/apache.crt
SSLCertificateKeyFile /etc/apache2/ssl/apache.key
DocumentRoot /var/www
<Location />
ProxyPass https://10.0.3.100:8443/
ProxyPassReverse https://10.0.3.100:8443/
</Location>
<Location /dp/redirect>
ProxyPass https://10.0.3.100:8443/
ProxyPassReverse https://10.0.3.100:8443/
</Location>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
</IfModule>
</IfModule>
我用mod_websocket修补了我的Apache。问题是Web套接字不能与该配置一起工作
我需要一种方法来配置Apache,将端口8443上的wss请求重定向到wss://remote.server:8443,而将端口8443上的https请求发送到,因此我需要一种方法来理解协议请求并使用相同的协议重定向到远程服务器
我该怎么办?多谢各位