We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

Website Cloning or Mirroring across multiple domains?

Zeke Rich
Zeke Rich asked
on
Medium Priority
274 Views
Last Modified: 2013-12-13
I have a website called globallistings.com (fictional), it is a business directory for multiple cities.
This search able online database is built in php , it only uses cookies and does not use sessions to share member info.

I want this website on various servers and share the same mysql data and user image uploads across multiple domains.

Domains For example use:

losangeleslistings.com;
chicagolistings.com;
newyorkcitylistings.com;

when the user goes to his city, he will see a custom website and graphics for his city that shares the same mysql data and user image uploads across all domains.

The main goal is to have many websites for different cities all sharing same mysql data and user image uploads, but each site having a unique design and domain name.

right now the images folder is located at:   ' globallistings.com /images ';
right now the mysql server is on localhost at globallistings.com

I understand myspace and facebook are also using this same system.

Question #1: What is the best way to accomplish this task?

Question #2: If main server is shut down "globallistings.com" can other websites still operate on separate servers?

Question #3: Do i clone the main mysql server or do i share the data from one mysql server across multiple domains?

Question #4: How do i handle user image uploads?

Thank you for your responses.

Comment
Watch Question

Most Valuable Expert 2011
Author of the Year 2014

Commented:
Well, that is four questions and we usually answer one question at a time, so I will take a crack at Q#2.

If you have a central server that has your images, and it goes away, your images go away.  So you would probably want to go with a content server like Akamai for this kind of application.

If I were going to answer Question #1, I think the answer would have to be given with an understanding of your budget.  In the development phase, I would just write programming that can be partitioned easily, and have all the domains resolve to the same IP address. If this starts to get the kind of traffic that Facebook carries, you will have different issues that are unrelated to PHP - ie, you will need to hire a lot of lawyers and accountants.

If you have more specific questions about any aspect of this, please post back here and I will try to drill down into the technical issues.

Best regards, ~Ray
Zeke RichOwner

Author

Commented:
Thank you for your response.
::Update:::
I was able to share the mysql database remotely among the different servers and i was also able to share the images.

I am using one mysql server and one folder and sharing the data remotely to the other servers.

The database is passing the information perfectly, but when the php is reading the image info width x height then passing the images it is too long of a delay taking up to 2 minutes to pass the data of one page that contains 30 images in a list.

Now i am considering using Curl with a cron job to update each database for localy for each server. Is this a efficient method? I will be grabbing the images and the data and storing them localy for each host via cron job set at one minute.

Any tips would be greatly apreciated.

@Ray_Paseur: my budget is $0 dollars.
NerdsOfTechTechnology Scientist
CERTIFIED EXPERT

Commented:
Cron job to compare and update the tables for all of the segregated servers.
Zeke RichOwner

Author

Commented:
@NerdsOfTech

I know mysql has a function to mirror said server it is called 'Replication Server'. I dont know if this is possible , i am on shared hosting with "The planet (hostgator) " i will also need to mirror the folder that contains uploaded pics, unless i move the images to blob in mysql (not convenient)?

If i cannot use the Replication Server function of mysql because i am on shared with "The Planet Hosting" what is the best way to compare tables of my servers?

What is the best way to compare my images folder from each server?
Most Valuable Expert 2011
Author of the Year 2014
Commented:
Unlock this solution with a free trial preview.
(No credit card required)
Get Preview
Zeke RichOwner

Author

Commented:
Thank you, this pointed me in the right direction. Although i could not get the script to work i did write a similiar one using php manual. Thank you!
Most Valuable Expert 2011
Author of the Year 2014

Commented:
Thanks for the points - glad you've got it headed in the right direction.  Best, ~Ray
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a free trial preview!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.