Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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?

Thanks

share|improve this question

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

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

    
Solved: RedirectMatch 301 ^/media(.*) mydomain.co.uk:4040$1 –  Owen Sep 1 '11 at 10:27

1 Answer 1

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 ?

share|improve this answer
    
I ended up using: RedirectMatch 301 ^/media(.*) mydomain.co.uk:4040$1 –  Owen Sep 1 '11 at 10:27

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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