Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Apache Proxy Redirect

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

  1. SweptSquash

    SweptSquash Member

    Joined:
    Apr 16, 2016
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    76
    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 Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,749
    Likes Received:
    1,885
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

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

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice