Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have taken domain and on Debian server server. on first domain [] i am running one application on port 80 now i i have install new second app for witch i want to use second domain [] ,now second app is running on port 8080 so current URL will be

Now Problems: 1.) i am not able to make to only how to do that i don't have idea. 2.) Now i want to create dynamic host name like [ ,] which should be redirect to only is their any configuration file is their or i have to install some app.

Thanks in Advance

share|improve this question

If your domain registrar allows them in the DNS settings, I think you should be able to do this using a SRV record. I have used SRV records with to do the same thing with a home-hosted site.

share|improve this answer
Thanks paradroid, – Shashi Dec 2 '10 at 11:28
Let me check with SRV – Shashi Dec 2 '10 at 11:28

1) The basic redirect setup is this:

<VirtualHost *:8080>
  <Location />
    RedirectMatch 302 /(.*)$$1

You may need to add other configuration around it. Make sure apache is configured to listen on port 8080, but it sounds like you've got that part covered already. The above config will preserve the request in full when redirecting; so:  =>

2) You can use wildcard ServerAlias directives to catch these. Inside your VirtualHost configuration for

ServerAlias *

Your script/app can then grab the HTTP_HOST variable, if it needs to know what was specified.

share|improve this answer

Your Answer


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.