node.js - apache redirecting www to subdomain -
i got server contains many application , 1 presentation page (served apache).
www subdomain presentation page , subdomain apps.
at moment, got 1 app written in nodejs (port 4000 example).
i want redirect traffic xxx.mydomain.com localhost:4000, working configuration:
<virtualhost *:443> servername xxx.mydomain.com:443 sslproxyengine on sslcertificatefile /root/cert.crt sslcertificatekeyfile /root/privatekey.key sslcertificatechainfile /root/cert.ca-bundle <location /> proxypreservehost on proxypass http://127.0.0.1:4000/ proxypassreverse http://127.0.0.1:4000/ </location> </virtualhost>
my problem apache redirecting www.mydomain.com xxx.mydomain.com automatically , got certificate error because xxx.domain.com certified subdomain , not www.mydomain.com.
i put config in same file xxx.domain.com vhost:
<virtualhost *:433> servername www.mydomain.com:443 documentroot /var/www/html sslengine on sslcertificatefile /root/wwwcert.crt sslcertificatekeyfile /root/wwwkey.key sslcertificatechainfile /root/wwwcert.ca-bundle </virtualhost>
what should ?
thank !
have try enter juste servername, not port after fqdn ?
servername www.mydomain.com
and no
servername www.mydomain.com:443
Comments
Post a Comment