Updated 26 February 2019
Bagisto allows you to set up and manage multiple instances of domains or stores in a single Bagisto backend. This guide will walk you through how to create multiple websites with different domains in Bagisto.
In short, with bagisto’s single instance, you can create multiple websites and provide different attributes and contents like
For example, a typical use case of setting multiple websites on one instance is when you want one set of categories and products on one domain and another set of categories and products on a separate domain in a different language.
For instance, here we are going to configure two websites (http://testbagisto4.com, http://testbagisto3.com) on the main instance (http://bagisto2.com/)
The bagisto’s channel functionality allows creating multiple websites in bagisto. Here you need to proceed towards Settings>>Channels
Click on Add Channel button to create a new channel in bagisto. Subsequently, you need to fill all the necessary fields.
Below are the fields that fall under the General section
Here the settings needed to be done for the currency and locale
Within the design section, you can choose a theme from the drop-down option if multiple themes have been created.
In addition to that, you can provide home page and footer content, logo and favicon images which are to be displayed at the front-end of your website.
Firstly, if you are using Apache as your web server and having root access, you need to go into your system files at the following path:
1 |
/etc/apache2/sites-enabled |
Further, you will get a configuration file named as 000-default.conf (the file name can vary).
After that, open the as said file above and add the following at the end of the document.
1 2 3 4 5 6 7 8 9 10 |
<VirtualHost *:80> ServerName bagisto2.com ServerAlias testbagisto3.com ServerAlias testbagisto4.com ServerAdmin webmaster@localhost DocumentRoot /home/sauravpathak/www/html/bagisto/public ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined </VirtualHost> |
The only change you need to make in the Apache configuration file is adding the parameter ServerAlias whose value will be hostname which you have provided while creating a channel in bagisto.
After you have saved the configuration, just restart your Apache service again.
At last, you have successfully mapped the two domains(http://testbagisto4.com, http://testbagisto3.com) with Bagisto main instance (http://bagisto2.com/).
If you have more details or questions, you can reply to the received confirmation email.
Back to Home
3 comments
I am serving this website on http://127.0.0.1:8000/ and another channel is added with hostname as testbagisto3.com. So, the question is how can I view the second website?
You can also achieve this locally as well. Kindly follow the steps mentioned in the blog regarding having root access.