开发者

How create beta (testing) website?

开发者 https://www.devze.com 2023-03-09 22:09 出处:网络
How create beta (testing) website use same webroot and cake folder ? That beta (testing) website probably i开发者_JAVA技巧s at http://beta.example.com or http://example.com/betaA method I have been us

How create beta (testing) website use same webroot and cake folder ? That beta (testing) website probably i开发者_JAVA技巧s at http://beta.example.com or http://example.com/beta


A method I have been using for a couple of years is to set up staging server instances. These could be either separate physical servers, or on the same server using hostname checks. However, it is good practice to have separate web roots and separate databases under each instance. You'll be asking for trouble if different aspects of your site are shared between staging instances!

My setup is the following:

  • Development (a computer with the source code on, set up to serve to http://websitename.dev (a local domain).
  • Preview (a separate server, used to provide a preview of a website or a change to a website, before doing the extra work to putting it live). http://websitename.preview.mycompanyname.com
  • Next (this is on the same server as the live website, under a different web root, and connected to a different database. The reason for this server is because SO MANY TIMES has a site worked on the development machine, but when it is put live, something on the live server makes the site DIE. http://websitename.next.mycompanyname.com
  • Live (the usual live server setup) http://websitename.com

This is all achieved by assigning DNS records correctly (to point to the correct servers), and using the config script of my web server application, listening to the hostnames and serving the correct web root.


A testing or "staging" server should be set up completely independently of the production server. You should not reuse any component of the live system, which even includes the database. Just set up a copy of the production system with a separate database, separate files, if possible a separate (but identical) server.

The point of a test system is to test code that is possibly buggy and may delete all your live data, shoot your dog and take your lunch hostage. Also, your test system may not be compatible with the production system, depending on what you're going to change down the road.

As such, create a new virtual host in your Apache config (or whatever you're using) and set it up exactly like the production system. Done.

0

精彩评论

暂无评论...
验证码 换一张
取 消