I currently have a mysite.com (A) which points to /public_html/ and a dev.mysite.com (B) which I created a /dev_html/ for that. I cloned the site but now I need a way of switching between them without having to copy all the files from one dir to another and without bringing the site down. I just want to switch the live site to B and then work on A, and when I finish, switch the live site to A and work on B. Is there a simple way? I'm using cPanel X and cPanel 11 (WHM VPS). Also, both can interact with the same database so that's not an issue as I'm not changing any database structure. Only the php/js/img files need to switch.
How do you do A/B switching in a web app? (for deploying updates)
142 Views Asked by stagas At
2
There are 2 best solutions below
0
Jon Winstanley
On
vhost file
Edit your vhosts file to point to the other directory.
Currently you will have a container that states that the site files are located at public_html
Change that to dev_html and run the following command to see if it all went ok.
apache configtest
If there are no errors, run
apache restart
Related Questions in WEB
- What is the point of definnig Asp.net Intrinsic Objects In different places and what is the different betwen them?
- how to prepend www if the url string does not has www?
- @Value annotation not resolved in a class that belongs to dependency jar
- referral link isn't being locked to one ip
- Under what conditions does href="#" cause scrolling to the top of the page?
- Webpage - Font size of table items on mobile phone browsers changes
- Web Service Error path property must set before calling the send method
- Calling ASP webpage from C# application
- What is the best way to make two web pages communicate between each other back and forth?
- CSS Different screen resolution
- How can hide url value in php
- HTML Control Form with PHP - Errors
- How would I use an only for IE8 and not for any other browser
- Client side computation without exposing code?
- detecting a file downloaded in selenium java
Related Questions in CLONE
- Implementing ICollection.CopyTo in C#: deep or shallow copy?
- cloning a private bitbucket repository given access to me
- Cloning a Javascript object with its type
- jquery get() method , how exactly does it work?
- Cloned jQuery button makes more clones than expected
- Block "cloner" servers rendering content from our server
- Most efficient way to clone a list into an existing list, minimizing memory reallocation?
- Bootstrap Toggle for Checkbox adding extra div
- Clone Views in Android
- Duplicate table line with Jquery incrementing ID's
- cloneNode() changes attribute value in InternetExplorer 10 and 11
- Clone table row and increment IDs by 1
- In C#, what are some rules of thumb for _where_ to clone objects?
- jQuery functions not working on cloned element
- iOS : Clone repository issue with pod install
Related Questions in UPDATES
- Apps that need access to camera wont work on newest android version
- how to update data from meteor in meteor using template helper which contain iteration
- update database java
- D3.js Enter, Update, Exit issue
- Unable to update a document elastica
- Cannot install typescript 1.4 after Windows 10 reservation
- Update list of items in c#
- Wordpress RPM not showing plugins update
- Is there away to specify which server you want?
- How I can execute extern Module Commands on a remote Computer in Powershell without install the Module?
- change routes of update rails
- Objective-C app update is deleting saved pictures
- OTA updates for Device Owner Android Application(Kiosk mode)
- Rethinkdb multiple update by one query and conditional
- Trigger Chrome extension update checking
Related Questions in ABTEST
- Analytics Experiments Dynamic URLs
- Google Optimize AB Test variant preview not showing
- How to calculate MDE w/ no. of visitors and conversion rate only?
- Firebase A/B Testing - Very High Total Revenue and Revenue Per User Data
- What script do I have to use to run A/B test instead of split URL in Google optimize?
- Trying to move from Angular 1.5x to ReactJS, what is the best way to A/B test and experiment with the views?
- A/B Test statistics
- Multiple Products with same name in Google Play's IAB
- In page A/B testing
- A/B Testing with support of Appcelerator Titanium?
- Mount Split gem dashboard within Rails_Admin
- ios Product Page Optimization stopped
- Python plot multiple z-test result with confidence interval (visualize A/B test results)
- how to run Two Proportion Z-Test if I run the test over entire population
- A/B Testing: which versions to compare in a follow up test
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Not sure if you have options to map domains, sub domains to folders in CPANEL as Im not a huge cpanel fan. The hosting company that I use allows mapping folders to domains and subdomains that I create so I have two folders too.
One of my folders in v1 and other folder is v2.
I point the live domain to v1 when Im working on enhancements on the version in v2 and point the domain to v2 when I have to do enhancements on v1 (but when switch happens I have to copy the files anyway- the advantage is that the beta website throws errors while Im copying over and not the main website)