Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Website and Server Administration Forum


You are currently viewing our Website and Server Administration Forum as a guest. Please register to participate.
Login



Reply
How to set up co-location linke php.net...
Old 12-24-2007, 09:21 PM How to set up co-location linke php.net...
dansgalaxy's Avatar
Defies a Status

Posts: 6,522
Name: Dan
Location: Swindon
Trades: 0
hello.

I really want to learn how to do this i have UK hosting and also access to US hosting and mainly to learn how i want to set it up so it auto syncs and also co-locates so i can go to us.dansgalaxy.co.uk and it will show my site exactly as it would if it was dansgalaxy.co.uk includeing subdomains... so ipme.dansgalaxy.co.uk if it was accessed through us.dansgalaxy would become ipme.us.dansgalaxy is this possible without re-writing evetything?
__________________
Discounted Web Hosting With XDnet!
>> Get 25% of hosting~ Promo: Webmaster-talk <<

Please login or register to view this content. Registration is FREE
dansgalaxy is offline
Reply With Quote
View Public Profile Visit dansgalaxy's homepage!
 
 
Register now for full access!
Old 12-26-2007, 01:08 AM Re: How to set up co-location linke php.net...
johnncyber's Avatar
Extreme Talker

Posts: 216
Trades: 0
The best way to do a "co-locate" is to set up domain name aliases. Basically how it works is you register the domain and point the nameservers to your host. Then in your webhosting control panel you can alias the us domain to your co.uk. So if you went to subdomain.dansgalaxy.com, it would be the same as subdomain.dansgalaxy.co.uk.

To do what I understand from your post, you might be able to alias the subdomains (at least I can through Plesk), so that dansgalaxy.com is an alias for us.dansgalaxy.co.uk.
__________________
~Mark Romero
-Co Founder | Tech Guru,
Please login or register to view this content. Registration is FREE

-FireFox Advocate,
Please login or register to view this content. Registration is FREE
johnncyber is offline
Reply With Quote
View Public Profile Visit johnncyber's homepage!
 
Old 12-26-2007, 10:38 AM Re: How to set up co-location linke php.net...
dansgalaxy's Avatar
Defies a Status

Posts: 6,522
Name: Dan
Location: Swindon
Trades: 0
i think you have mis understood a bit,

basically i have TWO seperate hosting accounts both i have reseller privs on.

I want us.dansgalaxy.co.uk to point to and work with one hosting and dansgalaxy.co.uk and all the rest to point to my UK host.

but i have subdomains and alsorts so it would need to work as well...
__________________
Discounted Web Hosting With XDnet!
>> Get 25% of hosting~ Promo: Webmaster-talk <<

Please login or register to view this content. Registration is FREE
dansgalaxy is offline
Reply With Quote
View Public Profile Visit dansgalaxy's homepage!
 
Old 12-30-2007, 07:43 AM Re: How to set up co-location linke php.net...
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,528
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
It's all done with DNS

on the authoritative nameserver for hostname.tld set an "A" record for "us" pointing to the other server IP, first making sure that no wildcards are set up.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 12-30-2007, 09:20 AM Re: How to set up co-location linke php.net...
dansgalaxy's Avatar
Defies a Status

Posts: 6,522
Name: Dan
Location: Swindon
Trades: 0
what would i go into to do this?
__________________
Discounted Web Hosting With XDnet!
>> Get 25% of hosting~ Promo: Webmaster-talk <<

Please login or register to view this content. Registration is FREE
dansgalaxy is offline
Reply With Quote
View Public Profile Visit dansgalaxy's homepage!
 
Old 12-30-2007, 09:51 AM Re: How to set up co-location linke php.net...
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,528
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
off hand I've no idea

do you have a control panel for your hosting. cPanel, Plesk or something similar? There is usually a DNS and virtualhosts interface there.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 12-30-2007, 02:41 PM Re: How to set up co-location linke php.net...
dansgalaxy's Avatar
Defies a Status

Posts: 6,522
Name: Dan
Location: Swindon
Trades: 0
i have CPANEL and have WHM access on both with RESELLER privs....
__________________
Discounted Web Hosting With XDnet!
>> Get 25% of hosting~ Promo: Webmaster-talk <<

Please login or register to view this content. Registration is FREE
dansgalaxy is offline
Reply With Quote
View Public Profile Visit dansgalaxy's homepage!
 
Old 12-30-2007, 04:13 PM Re: How to set up co-location linke php.net...
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,528
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
OK. Been a long time since I used cPanel so I won't be giving step by step instructions

BTW. Wildcarding is off anyway.

so in your dansgalaxy.co.uk DNS Zone control panel you should have an "A" record for dansgalaxy.co.uk pointing to 87.117.236.18, and CNAME records for "blog" & "www" aliased to dansgalaxy.co.uk. plus any other aliases you have set up.
There should also be MX records pointing to your mail server. (don't change these)

Add a host ("A") record of us.dansgalaxy.co.uk and point it to the IP of the other host, or add a "CNAME" of "us" and alias it to a hostname on the other server.
Leave the TTL, Refresh, Retry etc settings at the defaults.

on the other server, you need to set up a site with a VirtualHost name of us.dansgalaxy.co.uk.

Wait a few hours for DNS propogation and it should work
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 12-30-2007, 06:17 PM Re: How to set up co-location linke php.net...
dansgalaxy's Avatar
Defies a Status

Posts: 6,522
Name: Dan
Location: Swindon
Trades: 0
okay i think its done.

is there a easy way to have it syncroise accounts and files?
__________________
Discounted Web Hosting With XDnet!
>> Get 25% of hosting~ Promo: Webmaster-talk <<

Please login or register to view this content. Registration is FREE
dansgalaxy is offline
Reply With Quote
View Public Profile Visit dansgalaxy's homepage!
 
Old 12-30-2007, 09:51 PM Re: How to set up co-location linke php.net...
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,528
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Quote:
is there a easy way to have it syncroise accounts and files?
Other than having them on the same server pointing to the same location on the HD you mean
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 12-31-2007, 04:57 AM Re: How to set up co-location linke php.net...
dansgalaxy's Avatar
Defies a Status

Posts: 6,522
Name: Dan
Location: Swindon
Trades: 0
yea, but as im not (yet) admin on server and having them on the same server would kind of defeat the point of co-location not really viable Lol
__________________
Discounted Web Hosting With XDnet!
>> Get 25% of hosting~ Promo: Webmaster-talk <<

Please login or register to view this content. Registration is FREE
dansgalaxy is offline
Reply With Quote
View Public Profile Visit dansgalaxy's homepage!
 
Old 12-31-2007, 04:07 PM Re: How to set up co-location linke php.net...
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,528
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
there are several ways possible;

Manual FTP
A FTP script running on a schedule (Cron) on one of the servers GETting or PUTting the files to the other.
A FTP script running on your machine on a schedule that did a GET from one, and a PUT to the other.

My solution (being a programmer / coder) would be to have a custom 404 that recoded the requested URI into a URI from the main site and then did an include from the main site.

A requested URI of

us.hostname.tld/folder/page.ext

would equate to

include("hostname.tld/folder/page.ext")

The script would of course have to respond properly to the HTTP response codes from the main server and handle any include errors tidily.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 12-31-2007, 10:24 PM Re: How to set up co-location linke php.net...
dansgalaxy's Avatar
Defies a Status

Posts: 6,522
Name: Dan
Location: Swindon
Trades: 0
but u cant include from external files?
__________________
Discounted Web Hosting With XDnet!
>> Get 25% of hosting~ Promo: Webmaster-talk <<

Please login or register to view this content. Registration is FREE
dansgalaxy is offline
Reply With Quote
View Public Profile Visit dansgalaxy's homepage!
 
Old 12-31-2007, 10:26 PM Re: How to set up co-location linke php.net...
dansgalaxy's Avatar
Defies a Status

Posts: 6,522
Name: Dan
Location: Swindon
Trades: 0
i have got the idea for setting up the domain side of things

*please let me just get this out*

GRRR 1and1 SUCK!!! you have to pay tons jsut to get one mysql databse and it would be the same price as my RESELLER accoutn!! which has unlimted dbs emails etc!!! grrr
all you pay for is them to oversell space/bandwidth and email accoutns just to they can get back thier costs for the phone support!!

*and breate*
__________________
Discounted Web Hosting With XDnet!
>> Get 25% of hosting~ Promo: Webmaster-talk <<

Please login or register to view this content. Registration is FREE
dansgalaxy is offline
Reply With Quote
View Public Profile Visit dansgalaxy's homepage!
 
Old 01-01-2008, 10:43 AM Re: How to set up co-location linke php.net...
Ultra Talker

Posts: 483
Trades: 0
Quote:
Originally Posted by chrishirst View Post
A requested URI of

us.hostname.tld/folder/page.ext

would equate to

include("hostname.tld/folder/page.ext")
Wouldn't this defeat the purpose of what the OP is trying to achieve? It would seem as though this won't reduce the server load on the original server as each request to the 'other' server would still result in a hit on the original server... that's how it would seem to me.

Either way: I don't believe that this is what is generally called 'co-location'. I don't really know what you should be searching for, but co-location is not it... every other time I've seen co-lo stuff (and Google's define agrees with me) it's related to hardware that you own, placed in the data center of a third party.
__________________

Please login or register to view this content. Registration is FREE
TwistMyArm is offline
Reply With Quote
View Public Profile
 
Old 01-01-2008, 10:57 AM Re: How to set up co-location linke php.net...
dansgalaxy's Avatar
Defies a Status

Posts: 6,522
Name: Dan
Location: Swindon
Trades: 0
well yea... i have accounts on differant servers with differant companies in differant contries... and i am/have set up the domains so uk.DOMAIN,TLD goes to the uk version etc...

you are right tho that it would defeat the point...

and i plan to have some kind of script which i have yet to write manage redirection etc...

anyways how can i do this:

A) have some kind of script which syncs a specific list of files between all servers with the most upto date version.
B) how can i have a script which keeps all the databases synced so they are identical.

Answers on a post card, TP for working replies.
__________________
Discounted Web Hosting With XDnet!
>> Get 25% of hosting~ Promo: Webmaster-talk <<

Please login or register to view this content. Registration is FREE
dansgalaxy is offline
Reply With Quote
View Public Profile Visit dansgalaxy's homepage!
 
Old 01-01-2008, 02:25 PM Re: How to set up co-location linke php.net...
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,528
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Quote:
Wouldn't this defeat the purpose of what the OP is trying to achieve? It would seem as though this won't reduce the server load on the original server as each request to the 'other' server would still result in a hit on the original server.
It would should the intention be to "load share", which it doesn't appear to be.
The intention as I read it is to have a mirror site on a US IP but with a .co.uk tld which might not of course have the effect you are looking for.

Yes you are correct in that it is not co-location, just an aliased mirror site.

By including the output from a given URL you eliminate the need to have synchronising for the files and database because the variables and db extractions are processed on the primary host before the server output is streamed to the remote request.

It doesn't increase the server load any more than having the sub domain located on the same host and the latency should not increase significantly.

Don't forget of course we are NOT considering a site that is going to be in the 1,000+ concurrent users kind of traffic range, So server and database clustering isn't really an option. I would suggest that unless you actually have root access to one or both servers automatic synchronising isn't going to be an option either.

To synch databases, both servers will need the firewalls to have open TCP/UDP ports to the other server to allow traffic between them. There are so many things involved, that unless you have direct access to the servers you simply are not going to get the server techs from both providers to do what is needed. ESPECIALLY given that at least one of them is 1and1
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 01-01-2008, 03:18 PM Re: How to set up co-location linke php.net...
Ultra Talker

Posts: 483
Trades: 0
I'm not going to quote chrishirst's post, mainly because I really just want to copy the whole thing and say "I agree".

I think the question that really should be asked firstly is "why?", as in... why do you want these different servers in different locations that are replicated right down to the database level?
__________________

Please login or register to view this content. Registration is FREE
TwistMyArm is offline
Reply With Quote
View Public Profile
 
Old 01-01-2008, 04:22 PM Re: How to set up co-location linke php.net...
dansgalaxy's Avatar
Defies a Status

Posts: 6,522
Name: Dan
Location: Swindon
Trades: 0
okay first off is GOD I HATE 1and1 so hopefully i wont be with them for long (however if i do change i would mean loosing 5months worth of prepaid hosting which they will not refund...)

Okay it isnt really a need, more i want to learn how and i have two resellers in us and uk so why not use it to learn how to do thsi cool thing Lol.

So basically now easy way other than manual?

Just looked and figured out the remote mysql server thing so now the two version im hosting (dont ask why ) share databse so should be ok.

is there a way so if it cant open the remote db it uses local one?
__________________
Discounted Web Hosting With XDnet!
>> Get 25% of hosting~ Promo: Webmaster-talk <<

Please login or register to view this content. Registration is FREE
dansgalaxy is offline
Reply With Quote
View Public Profile Visit dansgalaxy's homepage!
 
Old 01-03-2008, 07:25 PM Re: How to set up co-location linke php.net...
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,528
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
For Dan

http://www.webmaster-talk.com/the-da...tribution.html
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to How to set up co-location linke php.net...

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.56011 seconds with 12 queries