0

I have a dedicated server with a bunch of stuff on it already. Basically, I am accessing it now with the free domain I got when I purchased the server (http://example.com/directory, etc).

I also have a second domain I want to use with a specific subdirectory (http://exampletwo.com/ should basically work as if I were under http://example.com/two, but it should use the exampletwo domain.

I would assume I would change the A record of the second domain to the IP of the server, but how do I make it work with a subdirectory? I have full DNS control of the second domain but it is purchased on from a different registrar than the dedicated server.

Andrew M
  • 115
  • 6
  • What OS are you using? – Jacob Jan 30 '11 at 22:33
  • Is this "dedicated server" a VPS that is hosted in the cloud somewhere? Are you using Windows/IIS, Linux/Apache, or something else? Ask an absurdly general question and you are likely to get an absurdly general answer. – Skyhawk Jan 30 '11 at 22:34
  • @Miles I agree about needing what OS it is running, but I don't see the need for if it's a VPS or Dedicated. – Jacob Jan 30 '11 at 22:39
  • I also agree that we need to know which OS or at the very least which web server you're running. – Michael Brown Jan 30 '11 at 22:42
  • Often, a VPS will come preinstalled with management tools, e.g. Webmin/Virtualmin or WHM/Cpanel. Understanding the specific nature of the server or VPS would enable us to identify the simplest solution. – Skyhawk Jan 30 '11 at 22:43
  • @Miles that is very true; I didn't think about that. – Jacob Jan 30 '11 at 22:47
  • It has Plesk/Virtuozzo and runs CentOS5. Looks like the virtual host thing will work, so looking at that now... I could edit it manually unless Plesk has some sort of way of modifying the file. – Andrew M Jan 30 '11 at 22:47
  • Never mind, looks like Plesk allows you to create new hosting accounts. I just made one and changed the A record to my server IP and it worked perfectly! Thanks everyone. – Andrew M Jan 30 '11 at 23:02
  • @Andrew You are welcome to post an answer to your own question explaining the solution. – Skyhawk Jan 30 '11 at 23:19

1 Answers1

2

how do I make it work with a subdirectory?

Use HTTP redirect/rewrite or virtual host.

Settings depend on the web-server.

alvosu
  • 8,437
  • 25
  • 22
  • I'm going to mark this as the answer since my original question did not assume that I had Plesk or other management software available. – Andrew M Jan 31 '11 at 01:57