Page 1 of 1

Domain redirect to ip: port

Posted: Fri Aug 05, 2016 8:32 am
by sennevb
Hi,

I have a question:
I have a domain test123.com and i want it to redirect to another port on the same server (different script giving output to server:3001) , anyone any ideas??

thanks in advance!

Re: Domain redirect to ip: port

Posted: Tue Aug 09, 2016 11:29 am
by Elizine
Try using mod_proxy -

Code: Select all

<VirtualHost *:80>
    ServerAdmin [email protected]
    ServerName dev.mydomain.com
    ProxyPreserveHost On

    # setup the proxy
    <Proxy *>
        Order allow,deny
        Allow from all
    </Proxy>
    ProxyPass / http://localhost:8888/
    ProxyPassReverse / http://localhost:8888/
</VirtualHost>