Question

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?

Was it helpful?

Solution

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>

OTHER TIPS

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top