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

Goodmorning.

Because my client wants to keep an old server (running php-fusion) running under the same domain name as a new server (running Drupal) I have a question. Is this possible? And most importantly how would I do this??

The old server URL structure is like projectname.domain.com and the new server's URL structure is domain.com/projectname.

Is this possible? To run these two servers side by side, on the same domain name- but with a different URL structure?

Thank you Marco

share|improve this question
    
Wildcard A records sounds good. So just to get it clear in my head, as far as A records are concerned. *.domain.com goes to the ip of the old server, domain.com goes to the ip of the new server. As far as htaccess files go. Are there any gotcha's there to be forseen? thanks guy's –  MarcoKotrotsos Oct 28 '09 at 10:17

3 Answers 3

Because of the way your setup is configured you may be able to do this, but it involves quite a bit of DNS configuration.

  1. Setup an A record for domain.com pointing to your new server. This will then mean any requests for domain.com/projectname will be sent to that server.
  2. To get requests for projectname.domain.com to point to the old server, you can do one of two methods:
    • Setup an A record for each project (project1.domain.com, project2.domain.com etc) to point to the old server OR
    • Setup an wildcard A record for *.domain.com to point to the old server. Setup any additional sub-domains that you may not want point to the old server as you wish.

By using this method it should ensure that all request in the new style (domain.com/projectname) go to the new server and the old style (project.domain.com) go to the old one.

share|improve this answer
    
I'd vote for wildcard A records and ServerAlias *.domain.com in the vhost –  Andy Oct 28 '09 at 9:38

Sure, you can do this with Apache ProxyPass directive. It maps a URI on your primary server to another Apache server. That page is transparently fetched and returned as if it was from the primary. I think this is what you're asking for.

ProxyPass    /projectname/xyz    http://drupal.localdomain/xyz
ProxyPassReverse   /projectname/xyz    http://drupal.localdomain/xyz

Read all about it here: http://httpd.apache.org/docs/1.3/mod/mod_proxy.html#proxypass

share|improve this answer

project.domain.com and domain.com/project are not the same domain name!

Just put in a new A record at the apex of your domain (for domain.com) pointing at the new server, and everything should be fine.

share|improve this answer

Your Answer

 
discard

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