skip to Main Content

I have a vps(Plesk, ubuntu) with one ip. I create a domain.com on the IP and several subdomains like jenkins.domain.com and blog.domain.com .
Now i wanted to redirect jenkins.domain.com to port 1122 and use this for example. But unfortunately all subdomains redirect then to domain.com:1122. What i want at the End is :

jenkins.domain.com redirect to domain.com:1122 without changing the url.

roundcube.domain.com redirect to domain.com:8844 without changing the url.

Is that possible?

2

Answers


  1. Chosen as BEST ANSWER

    I got it like just adding this config to the vhost.conf my subdomain(i.e jenkins) or into web server settings in Plesk.

    ProxyPass         /  http://localhost:1122/
    ProxyPassReverse  /  http://localhost:1122/
    ProxyRequests     Off
    ProxyPreserveHost On
    <Proxy http://localhost:1122/*>
       Order deny,allow
       Allow from all
    </Proxy>
    

  2. If all subdomains redirect it means that you have set wildcard virtual host. You have to create or modify two virtual host for every subdomain.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search