How to optimize your space, so that the space online rate reaches 100%

Source: Internet
Author: User
Keywords Website optimization

Intermediary transaction http://www.aliyun.com/zixun/aggregation/6858.html ">seo diagnose Taobao guest cloud host technology Hall

Do optimization friends know, want to do site optimization, stable server space is the basis, if the space Zooey not open, will inevitably lead to the site is down the right, and even by K station, so, we all want to find a stable space suppliers.

But is there a real space provider that can guarantee 100% online rates? It's obviously wood! Although we actually do not need so cow B space quotient, however, the problem is that we need to find a guarantee of 99% online rate is not so easy, or some space business usually looks very stable, Can keyword moment to you fall chain, depressed not to die you! I have had this experience, there was a space trader, stayed in that home for more than a year, during the basic no problem, but suddenly one day, the website can not open, 2 hours is not good, I contacted the space business, half a day after the reply, the result is that the server hard drive is broken, Then five days of maintenance and data rescue (although I have a backup, but ...) The latest backup is one months ago, Pit Dad!).

So, then the good space can not guarantee your website online rate of 100%, therefore, from the realistic point of view, we can achieve from the technical point of view, this is the current use of the network method, to share with you, hope to help.

Our principle is very simple, is through the Dnspod Web site monitoring to achieve when the server is down, automatically switch to the available backup server.

For different budget friends, 11545.html "> We have two backup server scenarios, one for VPS or stand-alone servers, and the other for stand-alone IP virtual space."

1,vps or stand-alone server We do not say, but is doing a good job in the Web environment, do a site with the same settings, and then through the software (such as CUTEFTP) to maintain the website of the regular update of the HTML static file upload, the database can maintain a manual backup once a week frequency, So when the server fails, the dnspod automatically switches to the backup server, and the visitor doesn't even feel anything.

2, the cost of using a stand-alone server or VPS is expensive, some friends may not accept, so we are here to give a low-cost alternative to the use of stand-alone IP virtual host to build multiple backup sites. There's no such good operation in front of it, but in fact it is not difficult, we mainly through the HTACECSS to implement a number of domain name building station (domestic or Hong Kong's most virtual space does not have a subdirectory binding function), so we through technical means to break through the limitations of IDC, the following attached I personally tested the method, Absolutely feasible:

If we buy a Hong Kong space, the perfect support. Htacecss, if we were to install two sites such as www.semzl.com and www.cpudaoreguizhi.com in this space, we first need to bind the domain name to space ( If the independent IP can omit this step, and then create two folders in the root directory Semzl and Daoreguizhi, the site source code to copy the corresponding folder, the last root directory add the following code of the. htacecss file:

# BEGIN Multisite

Rewriteengine on

Rewritebase/

Rewritecond%{http_host} ^ (www.)? semzl.com$

Rewritecond%{request_uri}!^/semzl/

Rewritecond%{request_filename}!-f

Rewritecond%{request_filename}!-d

Rewriterule ^ (. *) $/semzl/$1

Rewritecond%{http_host} ^ (www.)? semzl.com$

Rewriterule ^ (/) $ semzl/index.php [L]

Rewritecond%{http_host} ^ (www.)? cpudaoreguizhi.com$

Rewritecond%{request_uri}!^/daoreguizhi/

Rewritecond%{request_filename}!-f

Rewritecond%{request_filename}!-d

Rewriterule ^ (. *) $/daoreguizhi/$1

Rewritecond%{http_host} ^ (www.)? cpudaoreguizhi.com$

Rewriterule ^ (/) $ daoreguizhi/index.php [L]

# End Multisite

So, these two domains are perfectly bound to subdirectories, however, there is still a problem in use, is that the picture inside will not be normal, so we also need to be in the folder directory, but also the site source code of the directory to add the following code of the. htacecss file (for different sites, folder needs to be changed):

# BEGIN WordPress

Rewriteengine on

rewritebase/cpudaoreguizhi/

Rewriterule ^index\.php$-[L]

Rewritecond%{request_filename}!-f

Rewritecond%{request_filename}!-d

Rewriterule. /cpudaoreguizhi/[L]

# End WordPress

Look back to see if the DNSPOD monitoring whether set up the outage switch IP, and IP address is correct, if all is OK, then, for the stability of the server problem, you can sit back and relax, after all, two IDC at the same time the probability of failure is believed to be no more than 1 per thousand probability.

PS: The above code I only use WordPress after testing, and in the background can not use domain name plus +wp-admin to access, but can use wp-login.php, as for other CMS is feasible, please test yourself.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.