Alwahsh Posted August 25, 2009 Posted August 25, 2009 Hi , I need an expert to help me . I had some problems with my old host and wanted to move to heliohost . The old host provides more space and more bandwidth , I want to make my website work on both hosts and on the servers , I mean some visitors go to the old host and others come to here . To consume less bandwidth . Is that possible ?? and can any one help me with this ?? My website : http://www.alwahshnt.net
Byron Posted August 25, 2009 Posted August 25, 2009 Hi , I need an expert to help me . I had some problems with my old host and wanted to move to heliohost . The old host provides more space and more bandwidth , I want to make my website work on both hosts and on the servers , I mean some visitors go to the old host and others come to here . To consume less bandwidth . Is that possible ?? and can any one help me with this ?? My website : http://www.alwahshnt.net You can do it with mod rewrite. This would go inside the .htaccess file of your first host (alwahshnt.net): RewriteEngine On RewriteCond %{TIME_SEC} ^[0-2][0-9]$ RewriteRule ^(.*)$ http://alwahshnt.heliohost.org/$1 [R=302,L] Rewrite above redirects in seconds - if its 29 seconds into current minute, first site. After 29 seconds, heliohost site.
Alwahsh Posted August 25, 2009 Author Posted August 25, 2009 You can do it with mod rewrite. This would go inside the .htaccess file of your first host (alwahshnt.net): RewriteEngine On RewriteCond %{TIME_SEC} ^[0-2][0-9]$ RewriteRule ^(.*)$ http://alwahshnt.heliohost.org/$1 [R=302,L] Rewrite above redirects in seconds - if its 29 seconds into current minute, first site. After 29 seconds, heliohost site. Thanks for answering . But I think I might face some problems : 1- should I set the nameservers of the domain to the name servers of my old host and heliohost at the same time like this : ns1.myoldhost.com ns2.myoldhost.com ns1.heliohost.org ns2.heliohost.org 2- I set the domain of the heliohost host to alwahshnt.net , I mean alwahshnt.net is my main domain in heliohost's host 3- I have some databases , Can I connect the 2 data bases or use one database for both sites (like remote database connection or something like that) . I copied all the files from the old host to heliost , now heliohost's server have the same as my oldhost's server .
Byron Posted August 25, 2009 Posted August 25, 2009 Thanks for answering . But I think I might face some problems : 1- should I set the nameservers of the domain to the name servers of my old host and heliohost at the same time like this : ns1.myoldhost.com ns2.myoldhost.com ns1.heliohost.org ns2.heliohost.org Your not going to be able to have two servers using the same domain name. 2- I set the domain of the heliohost host to alwahshnt.net , I mean alwahshnt.net is my main domain in heliohost's host What is the name of your heliohost domain? 3- I have some databases , Can I connect the 2 data bases or use one database for both sites (like remote database connection or something like that) . I can't help you there, sorry.
Alwahsh Posted August 25, 2009 Author Posted August 25, 2009 I think this can not be performed then . Thanks for help btw my heliohost domain name is alwahshnt.net the same as my old host domain name
Ashoat Posted August 25, 2009 Posted August 25, 2009 You can use one database from two servers. Is the database hosted on HelioHost, or somewhere else?
Alwahsh Posted August 25, 2009 Author Posted August 25, 2009 Using 1 database for 2 servers is what I meant . How can I do it ?? Now I have the database on my old host and on Heliohost too , so if I can use one of them for both servers , plz tell me how ?? and do you have a way to make my website be on one server for time and on the other site for the other time . If it's impossible , I can use the one database on 1 website only and then keep changing the nameservers from time to time manually . Thanks for your reply Alwahsh
rvt Posted August 25, 2009 Posted August 25, 2009 Does you old host let you access your database remotely? If so, just give access to your Heliohost account (I think you give privileges to an IP address actually). If not, I believe Heliohost lets you access your database remotely so just run it from here and give access to the database to your old host. For splitting the load between 2 servers, just put all 4 name servers in. Then, 50% of the time your address will resolve to one host and 50% of the time it will resolve to the other host. If you use email with your domain name, be sure to set the MX records to the same thing on both hosts. This is very doable and is done in business sites. It is known a "Load Balancing".
Byron Posted August 25, 2009 Posted August 25, 2009 For splitting the load between 2 servers, just put all 4 name servers in. Then, 50% of the time your address will resolve to one host and 50% of the time it will resolve to the other host. If you use email with your domain name, be sure to set the MX records to the same thing on both hosts. This is very doable and is done in business sites. It is known a "Load Balancing". Great! I wasn't aware you could do this. How do you enter all four nameservers when the dns provider only shows 2 text fields for the nameservers? ie: ns1: ns2:
Alwahsh Posted August 26, 2009 Author Posted August 26, 2009 For splitting the load between 2 servers, just put all 4 name servers in. Then, 50% of the time your address will resolve to one host and 50% of the time it will resolve to the other host. If you use email with your domain name, be sure to set the MX records to the same thing on both hosts. This is very doable and is done in business sites. It is known a "Load Balancing". Great! I wasn't aware you could do this. How do you enter all four nameservers when the dns provider only shows 2 text fields for the nameservers? ie: ns1: ns2: actually someone told me this won't work as for the only 2 nameservers , this is in free domains such as co.cc but I think you can press add more nameservers . as for my domain I think I can have up to 10 or more nameservers > thanks so much byron for the info . I will tell you if it works . Does you old host let you access your database remotely? If so, just give access to your Heliohost account (I think you give privileges to an IP address actually). If not, I believe Heliohost lets you access your database remotely so just run it from here and give access to the database to your old host. For splitting the load between 2 servers, just put all 4 name servers in. Then, 50% of the time your address will resolve to one host and 50% of the time it will resolve to the other host. If you use email with your domain name, be sure to set the MX records to the same thing on both hosts. This is very doable and is done in business sites. It is known a "Load Balancing". Thanks so much for the info . Now I still have one question : I added access to the ip of heliohost to my old host database using Remote MySQL . Now what should I do to make the files on heliohost access the database on my old host ?? Thanks Alwahsh I read on the internet and I found this solution : to write in the file which connects to the database instead of local host in the db server , I should replace it with the ip of my old host I'll try that and tell you the results and please tell me if there is a mistake . It didn't work , it gets me an error saying that the MySQL can't connect to sql server on "ip adress of my old host" , Any solutions ??
Ashoat Posted August 26, 2009 Posted August 26, 2009 For the "host" field in your settings file you'll need to put the IP of the server followed by a colon followed by a port. If no port is given, 3306 is assumed. Make sure you have the right IP address and the right port. If it still won't work, contact your old host. Does you old host let you access your database remotely? If so, just give access to your Heliohost account (I think you give privileges to an IP address actually). If not, I believe Heliohost lets you access your database remotely so just run it from here and give access to the database to your old host. For splitting the load between 2 servers, just put all 4 name servers in. Then, 50% of the time your address will resolve to one host and 50% of the time it will resolve to the other host. If you use email with your domain name, be sure to set the MX records to the same thing on both hosts. This is very doable and is done in business sites. It is known a "Load Balancing".Uhm... no. That's not load balancing. Where in the world did you hear this? You can't point a single domain to multiple nameservers. If you do, the first two records will take priority.
Alwahsh Posted August 26, 2009 Author Posted August 26, 2009 For the "host" field in your settings file you'll need to put the IP of the server followed by a colon followed by a port. If no port is given, 3306 is assumed. Make sure you have the right IP address and the right port. If it still won't work, contact your old host. Does you old host let you access your database remotely? If so, just give access to your Heliohost account (I think you give privileges to an IP address actually). If not, I believe Heliohost lets you access your database remotely so just run it from here and give access to the database to your old host. For splitting the load between 2 servers, just put all 4 name servers in. Then, 50% of the time your address will resolve to one host and 50% of the time it will resolve to the other host. If you use email with your domain name, be sure to set the MX records to the same thing on both hosts. This is very doable and is done in business sites. It is known a "Load Balancing".Uhm... no. That's not load balancing. Where in the world did you hear this? You can't point a single domain to multiple nameservers. If you do, the first two records will take priority. what If I write this : ns1 : ns1.myoldhost.com ns2 : ns1.heliohost.org ns3: ns2.myoldhost.com ns4: ns2.heliohost.org As for the database , I think it would be easier to use heliohost as the host who has the database and let files on the other host take info from here , if the ip of the old host is (for example) xx.xxx.xx.xx , what exactly should I write in the host field in Remote MySQL at Heliohost Cpanel ?? and how should I make the files on the old host connect to this database ?? should I just write instead of localhost , the ip adress of heliohost server ?? Thanks so much for help Alwahsh
Ashoat Posted August 26, 2009 Posted August 26, 2009 Your first record should always take precedence, but it's not good to mess around with nameserver records. For the host field you'll just need the IP address. On the other host, put stevie.heliohost.org as the MySQL hostname.
Alwahsh Posted August 27, 2009 Author Posted August 27, 2009 Your first record should always take precedence, but it's not good to mess around with nameserver records. For the host field you'll just need the IP address. On the other host, put stevie.heliohost.org as the MySQL hostname. ok this worked and i could connect to the database from my old host files ... but it only worked for about 5 mins then it started to return error : 1045 - Access denied for user 'alwahsh_admin'@'lwresellers1.smokyhosts.net' (using password: YES) Query: [READ] Unable to connect to MySQL server btw does your servers support search engine friendly links , because it returns 404 when I use threm > Thanks so much for your help and sorry for your time Alwahsh
Ashoat Posted August 27, 2009 Posted August 27, 2009 Search-engine friendly links need to be implemented by mod_rewrite directives in your .htaccess file. No server supports them innately - FURLs are implemented on a per-application basis. Try downloading a SQL client on your home machine and see if you can connect from there. I am able to connect remotely to SQL fine, so I suspect it's a problem from your end.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now