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!

Configuring reverse proxy for python script

Discussion in 'EasyApache' started by vengefuldeath87, Aug 6, 2017.

  1. vengefuldeath87

    Joined:
    May 19, 2005
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    151
    I am struggling to configure apache to reverse proxy to a python webserver running on port 5000. This is the configuration i have used on a regular server without cpanel. Ive put this in the pre and post include section but neither work. What am i doing wrong?
    Code:
    <VirtualHost *:80>
       ServerName sub.domain.com
    
       ProxyRequests Off
       ProxyVia Off
    
           <Proxy *>
                 Require all granted
           </Proxy>
    
       SSLProxyEngine          On
           ProxyPass / http://localhost:5000/
           ProxyPassReverse / http://localhost:5000/
    </VirtualHost>
    
     
    #1 vengefuldeath87, Aug 6, 2017
    Last edited by a moderator: Aug 6, 2017
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,491
    Likes Received:
    1,964
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    There's no support for a reverse proxy configuration in cPanel, but if you want those particular entries (minus the <VirtualHost> tags)
    added to all virtual hosts on the server (or just a single virtual host), then you'd use the instructions documented at:

    Modify Apache Virtual Hosts with Include Files - EasyApache 4 - cPanel Documentation

    Remember to run the following command after setting up a custom include file:

    Code:
    /usr/local/cpanel/scripts/ensure_vhost_includes --all-users
    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