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
- Settlement Amount of Razorpay Dashboard is not correct
- How can I implement synchronous registration on a website and a forum by linking their databases?
- NextJS 13+ how to use parallel + intercepting routes to create a modal on a page which also stores/syncs state with search params?
- logo image error nextjs notion starter kit with teamspace
- how do i create slider on Wix website builder?
- Why do I get 500 error on Azure after using ViewBag?
- After pg-related pop-up calls and processing, the web application JSESSION is broken
- How can i upload image on Laravel React App
- React Routing in web development using an index template
- Why is my time filter not updating within my Quasar template?
- Why do I have a 403 error when trying to save a website
- Hadoop MiniCluster Web UI
- How to debug flutter web app to check maximum memory consumption issue?
- How to send a HTTP Cookie using the Set-Cookie header over a HTTP connection?
- Is it posible to modify packets that creats by request python module?
Related Questions in CLONE
- Leetcode 1255-recursion and backtracking
- Forking vs Cloning in GitHub
- Trying to run a "uber clone" from github in react native ( vs code )
- I can´t clone my github repository with a ssh key
- Laravel 9 $model->replicate() is not immutable
- Cloning resources group into another
- A way to declare and clone a cloneable (#[derive(Clone)]) struct with a type parameter and a field that is an Arc of an uncloneable type in Rust?
- GIT repo with submodule that can point to two different repositories
- Site Not Found Error After Deployed in Firebase
- PHP Cloning an object when a reference exists breaks the clone
- Git how to pull the update from original repository and keep my own changes
- git svn clone does not grab a branch not in stdlayout
- PDO clone a record then open cloned record to edit
- Problem in Hover Animation in a ReactJS Component
- How to clone an element on click in React.js
Related Questions in UPDATES
- Unable to install .net 4.8 runtime or any updates
- Electron Updates with update.electronjs.org
- Table Update from a form using VBA
- not recognizing updates to data on 2nd edit in ObjectListView / Python
- allowDeferredLocationUpdates(untilTraveled:timeout:) deprecated
- Why am I getting a warning about conflicting distribution on apt update and the system becomes unresponsive after apt upgrade
- Patch executable is deleted by windows defender but the same was not deleted in earlier build patches
- Update Form with 2 different source models, with 2 foreach
- How to perform a major update on typo3
- Merge (insert /update)
- MONGODB. Error with arrayFilters: No array filter found for identifier 'elem' in path
- I have issue regarding windows updates and microsoft store updates
- Run a Python script from another background Python script
- Anaconda - Conda update error - PermissionError: [WinError 5]
- Migration to Survey Creator V2 over React
Related Questions in ABTEST
- Does A/B testing in Laravel (and general) require a kind of dashboard, where different A/B test can be started and so called managed?
- How to set up an AB Test for an email campaign
- Firebase A/B Testing - Very High Total Revenue and Revenue Per User Data
- How to calculate MDE w/ no. of visitors and conversion rate only?
- what is hypothesis testing?
- Can we use CUPED if correlation between control and treatment equals to 1?
- Can I use metric clic per day or click per day hours to evaluate results of AB test
- how to run Two Proportion Z-Test if I run the test over entire population
- Firebase A/B testing from Backend
- ios Product Page Optimization stopped
- How Do You AB Test Your iOS App Icon on App Store Connect?
- iOS: Unable to see the option of App Icon in the Product Page Optimization page in the app store connect
- Causal Inference where the treatment assignment is randomised
- Google Optimize: "Calculated Conversion Rate" contradicting "Probability to be Best"
- What script do I have to use to run A/B test instead of split URL in Google optimize?
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 # Hahtags
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)