我有 apache 和 mod_cluster 用于 Wildfly 集群
我在 443 上有一个虚拟主机
我在同一服务器 apache 上的 8443 上有一个 NodeJS
我想将服务器/api重定向到服务器:8443(nodejs)
NODEJS 和 apache 位于同一服务器上(apache 443,nodejs 8443)
<VirtualHost ip:443>
ServerName server
SSLProtocol all -SSLv2 -SSLv3
SSLHonorCipherOrder on
SSLEngine on
SSLCipherSuite ALL:!MD5:!EXPORT:!DES:!3DES:!DHE:!EDH:!RC4:!aNULL:!eNULL:!MEDIUM:!LOW
SSLCertificateFile /etc/httpd/certs/newcert.pem
SSLCertificateKeyFile /etc/httpd/certs/newkey.pem
SSLCertificateChainFile /etc/httpd/certs/newcert.pem
<Directory />
Require all granted
</Directory>
<Location /mcm>
SetHandler mod_cluster-manager
Order Allow,Deny
Allow from all
</Location>
AllowDisplay On
AllowCmd Off
KeepAliveTimeout 180
TimeOut 300
***SSLProxyEngine on
ProxyRequests Off
<Location /api>
ProxyPreserveHost On
ProxyPass https://server:8443
ProxyPassReverse https://server:8443
</location>***
<Location /status>
SetHandler server-status
</Location>
******** 之间的部分不起作用,其他应用程序无法找到。我不知道如何实现它..有负载均衡器,以及 Node JS前面的虚拟主机
如果我删除这部分,它适用于 Wildfly 集群上的所有应用程序
有什么想法吗?
只需在网址末尾添加/
<VirtualHost ip:443>
ServerName server
SSLProtocol all -SSLv2 -SSLv3
SSLHonorCipherOrder on
SSLEngine on
SSLCipherSuite ALL:!MD5:!EXPORT:!DES:!3DES:!DHE:!EDH:!RC4:!aNULL:!eNULL:!MEDIUM:!LOW
SSLCertificateFile /etc/httpd/certs/newcert.pem
SSLCertificateKeyFile /etc/httpd/certs/newkey.pem
SSLCertificateChainFile /etc/httpd/certs/newcert.pem
<Directory />
Require all granted
</Directory>
<Location /mcm>
SetHandler mod_cluster-manager
Order Allow,Deny
Allow from all
AllowDisplay On
AllowCmd Off
KeepAliveTimeout 180
TimeOut 300
SSLProxyEngine on
ProxyRequests Off
<Location />
ProxyPreserveHost On
ProxyPass https://server:8443/
ProxyPassReverse https://server:8443/
</location>
<Location /status>
SetHandler server-status
</Location>
在我的例子中,位置必须是/否则它不起作用
我是一名优秀的程序员,十分优秀!