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.

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 Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,094
    Likes Received:
    1,288
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    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.
     
Loading...

Share This Page