I have a dedicated server (Running centos, with Apache etc as a Web Server). With a domain name and subdomains all set up and working fine.

I would like to set up a new subdomain, eg: subdomain.domain.com to point at a different port running a web app.

The app listens on port 4040, and the behaviour I would like is - typing subdomain.domain.com results in the server resolving the query to my.ip:4040, so I don't need to navigate to subdomain.domain.com:4040.

Is this possible using Apaches vhost configuration?

If so? How do I do it?


migrated from stackoverflow.com Jun 22 '11 at 2:55

This question came from our site for professional and enthusiast programmers.


Do you want to redirect queries to the app server or do you want to proxy the requests so access to subdomain.domain.com forwards all the appropriate requests and responses to the app server running on 4040 ?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.