The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Apache Proxy Redirect

Discussion in 'EasyApache' started by SweptSquash, Sep 30, 2016.

  1. SweptSquash

    SweptSquash Registered

    Joined:
    Apr 16, 2016
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    UK
    cPanel Access Level:
    Root Administrator
    Hi,

    I'm currently in the process of setting up a WebSocket with NodeJS however I've hit a bit of an issue in the configuration. I'm trying to setup a proxy redirect over https for port 8443 on a subdomain with HSTS Enabled, except I have an SSL Handshake issue.

    I've tried utilizing ProxyPass and now the RewriteCond which cPanel utilizes in the httpd.conf I've placed the following in /etc/apache2/conf.d/userdata/ssl/2_4/senshudo/api.senshudo.tv/default.conf

    Code:
    <Proxy "*">
            <IfModule security2_module>
                SecRuleEngine Off
            </IfModule>
    </Proxy>
    
    RewriteEngine On
    
    <IfModule ssl_module>
            SSLEngine on
            SSLProxyEngine On
            SSLProxyVerify none
            SSLProxyCheckPeerCN Off
            SSLProxyCheckPeerName Off
            SSLProxyCheckPeerExpire Off
            SSLCertificateFile /var/cpanel/ssl/cpanel/mycpanel.pem
            SSLCertificateKeyFile /var/cpanel/ssl/cpanel/mycpanel.pem
            SSLCertificateChainFile /var/cpanel/ssl/cpanel/mycpanel.pem
    </IfModule>
    
    RewriteCond %{HTTP_HOST} ^api.example.tv
    RewriteCond %{HTTPS} on
    RewriteRule ^/app/(.*) https://127.0.0.1:8443/$1 [P]
    
    UseCanonicalName Off
    
    <IfModule security2_module>
            SecRuleEngine On
    </IfModule>
     
    #1 SweptSquash, Sep 30, 2016
    Last edited by a moderator: Oct 2, 2016
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,745
    Likes Received:
    662
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello,

    Could you provide some more details about the specific issue or error message you are facing?

    Thank you.
     
Loading...

Share This Page