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!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Setting up a VirtualHost Proxy

Discussion in 'EasyApache' started by erfg1234, May 15, 2018.

Tags:
  1. erfg1234

    erfg1234 Member

    Joined:
    Dec 12, 2014
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Cape Coral, Florida, United States
    cPanel Access Level:
    DataCenter Provider
    I want to setup a virtual host proxy for a NodeJS application running on an account. I'm accessing the account by http://(IP ADDRESS)/~dev

    The NodeJS application is running web Express on port 3000.

    I went in to Apache Configuration > Include Editor > Pre VirtualHost Include > All Versions. Then restarted Apache after adding this. Am I missing something?

    <VirtualHost (IP ADDRESS):80>
    ServerName dev.com
    ProxyPreserveHost On
    ProxyPass "/" "http://localhost:3000/"
    ProxyPassReverse "/" "http://localhost:3000/"
    <IfModule suphp_module>
    suPHP_UserGroup dev dev
    </IfModule>

    <IfModule suexec_module>
    <IfModule !mod_ruid2.c>
    SuexecUserGroup dev dev
    </IfModule>
    </IfModule>
    <IfModule ruid2_module>
    RMode config
    RUidGid dev dev
    </IfModule>
    <IfModule mpm_itk.c>
    # For more information on MPM ITK, please read:
    # apache2-mpm-itk
    AssignUserID dev dev
    </IfModule>
    <IfModule mod_passenger.c>
    PassengerUser dev
    PassengerGroup dev
    </IfModule>

    <IfModule userdir_module>
    <IfModule !mpm_itk.c>
    <IfModule !ruid2_module>
    <IfModule !mod_passenger.c>
    UserDir enabled dev
    </IfModule>
    </IfModule>
    </IfModule>
    </IfModule>
    </VirtualHost>
     

    Attached Files:

  2. erfg1234

    erfg1234 Member

    Joined:
    Dec 12, 2014
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Cape Coral, Florida, United States
    cPanel Access Level:
    DataCenter Provider
    Looks like it's gotta be a domain. Can't do this with a tilde username.
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,276
    Likes Received:
    1,759
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page