Sign up ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I hope this is the right place to post this issue, serverfault seemed wrong to me...

Say I have a machine running MAMP.
This machines IP is managed in a account from to a specific domain, say
In htdocs there is currently only one folder, holding an owncloud system.
Now I thought I could simply add a little homepage by adding a second folder and registred a second domain, in dyn-account.

But now, instead of setting the IP of to
and the IP of the homepage to,
I was only able to set the IP

So my next idea was, that there has to be a way to redirect, depending on the requested domain.
So that would be redirected to
and would be redirected to

To achieve this I found some information about "WebHop", 301-redirects, using .htaccess or even virtual hosts. But the described usage everytime was a different one than my situation. Now I am totally confused what would fit my case or if thats just impossible, the way I thought of it.

As I looked into WebHop it seemed, that I would need 3 domains, say, and, where the two latter would redirect to or, but I wasn't able to get this to work.

Was that a wrong approach or did I do something else wrong?

share|improve this question

1 Answer 1

You can still accomplish this with 2 domains, like this:

  • will open
  • will open

For this, you point both domains to IP and then configure your web server to support 2 different vhosts and point each configuration to use webroot of where owncloud and homepage folders are. No redirection is necessary here.

share|improve this answer
Okay, thank you - so I will have a deeper look into virtual hosts. Does "Server" in that case mean my MAMP or the actual machine it's running on? – Jochen Reinschlüssel Mar 27 '14 at 6:45
MAMP. Have a look at this page: – Mar 27 '14 at 8:08

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.