Forum Moderators: phranque

Message Too Old, No Replies

subdomain pointing to another IP?

         

AffiliateDreamer

7:34 pm on Dec 4, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi,

I have a dedicated server and host some web applications on it.

I want to run another application that is hosted on ANOTHER server.

I read that if I can point my subdomain to another IP address this is possible.

How is this done?

gergoe

11:23 pm on Dec 4, 2007 (gmt 0)

10+ Year Member



You should start reading the Apache manual (available at [httpd.apache.org ]), and start your reading with the ProxyPass directive [httpd.apache.org], or if you need more sophisticated control on what to proxy to the other server, then check out the documentation of the mod_rewrite module [httpd.apache.org], and also the URL Rewriting Guide [httpd.apache.org] for practical rewriting tips and working examples.

In any case, your server must have the mod_proxy module (and its dependent modules, like mod_proxy_http) enabled.

lammert

10:36 am on Dec 5, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



The OP was asking about subdomains pointing to another server, not about proxies. Subdomains can be easily pointed to another IP address by editing the DNS A entry for that subdomain. No Apache settings are involved. After this change www.example.com points to his own dedicated server, subdomain.example.com to the application server.

AffiliateDreamer

12:28 pm on Dec 5, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I just find it odd that you could be at vbulletin.example.com and be serving the files from a different server than example.com (not only server, but the server could be in a different country).

AffiliateDreamer

12:29 pm on Dec 5, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



does this mean I could do cnn.example.com and just point my IP to cnn's IP and my server would have their data? Or does the other server (the IP of cnn.example.com) somehow have to be setup to allow this?

jdMorgan

1:35 pm on Dec 5, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yes, using the DNS method, the other server may have to be set up to 'recognize' requests for the subdomain hostname, if it is a name-based server.

Or you can use the proxy method described above. The downside of the proxy method is that the other server will see all requests proxied from your domain as coming from your server. It's not clear what you're trying to do here, but it will indeed be obvious to the application server's admin that you are proxying requests to their machine.

Jim

AffiliateDreamer

3:20 pm on Dec 5, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I want to signup for a hosted application, but I don't want it to be on a different domain for branding reasons so I asked the support team and they said if I can point a subdomain to a diffrent IP I can have the application seem like it is hosted on my domain.

gergoe

5:58 pm on Dec 5, 2007 (gmt 0)

10+ Year Member



lammert has a point, if you only want to make a host (subdomain as you say) point to a different server, then you only need a DNS entry pointing to the ip address of that remote server (and it does not matter where is located, can be next room, but other side of the world as well). In this case the application provider (of the application you want to link to) needs to be notified that you will do that, they might need to adjust the server configuration.

A domain (as it's name suggest), not more than a collection of entities, it is not linked to anything except the name server which hosts it (maintains these entities - called records). You can add a host entry like server1.example.com pointing to your first server, but you can also add cnn.example.com pointing to the cnn's website, but it will only work if you have some friends at cnn, and they do configure their servers (or if you are lucky, it will work without that, it depends on the server configuration).

AffiliateDreamer

6:57 pm on Dec 5, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The issue for me is this, I am running IIS but I need a product that is php/mysql based and I don't want to install that on my server as I prefer having someone else host it for me.

At the same time I want to keep everything under my domain name for branding reasons etc.

This is pretty cool that you can do this, I still find it wierd though hehe.