5 votes

Multi-Domain routing

To do this, copy index.php and .htaccess from a.com’s webroot into b.com’s, and make sure the $craftPath variable is correct. Then, around where $craftPath is getting defined, override $_GET['p'] to ...
5 votes
Accepted

Licensing a multi-lingual site using different domains

I got the official answer from Brandon, here is the summary for anyone that might be in a similar situation: I can do what I need with only one pro license the main portal (acme.com) will run the "...
4 votes
Accepted

Can you run Craft CP on one webserver and serve the front end content on a separate one?

It looks like this question was resolved via some extended sleuthing in the comments above: Can I disable the control panel? How can I run the Control Panel from a separate domain? Overall, it looks ...
  • 13.3k
4 votes
Accepted

Using an IP address in config/db.php

The short answer is yes — you need to use a domain names. You might also want to have a look at this multi-environment configuration method defined on the craft cookbook website that creates a global ...
4 votes

Minimum database privileges for Craft front-end?

Short answer, no. You'll want to make sure that your DB user has all of the necessary privileges. Just because you're not entering your data into the database doesn't mean that Craft isn't writing ...
  • 23.7k
4 votes
Accepted

Multi domains in Craft 2 licensing

Using this technique to share the Craft app folder across different sites, results in each site having their own config folder. Since the license.key file that determines the licensing status of Craft ...
4 votes

Craft 3 multi-lingual multi-sites setup with shared assets

You could create 2 site groups. One group for site A and one group for site B. Sitegroup A will contain contain 2 sites, the other one only one site. Your setup will look like this SiteGroup A -...
4 votes
Accepted

How to route 404 errors for multi-site Craft?

I pondered this for a while, and then did this, which will direct us to specific entries (not templates, I don't want to create more of those): {# We need a unique 404 for each site - just take us to ...
  • 598
3 votes

How to setup assets in multi site where each site should have its own assets?

When you're creating a new local asset volume, you choose a file system path. I use both the site handle and the section handle in the path. For example: /assets/<SiteHandle>/images/<...
3 votes
Accepted

Two domains - single install - Live Preview works only on one

In order to get Live Preview to work across different subdomains on a single install, you'll need to setup a few extra things as outlined in this support article: https://craftcms.com/support/cross-...
  • 66.7k
3 votes

Assets, Multi Locale and 'Target Locale'

The "Target Locale" setting under the Asset field's settings is referring to which locale do you want to select assets in. When it's set to "Same as source", then, for example, if you're viewing an ...
  • 66.7k
3 votes

Multi site licences

If the multiple sites are based on sub-domains (i.e. site1.site.com, site2.site.com), then a single craft/config/license.key file will cover all of the sites with no issues.
  • 66.7k
3 votes
Accepted

Site set up with mutiple sub domains

The approach you described is interesting and should actually work. Separate root folders would allow you to define the template folders individually (→ see Ben's answer on how to set this up), but it ...
  • 36k
3 votes
Accepted

user session for Multi Site

If both sites share a common root domain, you can share cookies by using that root domain as the cookie domain for both sites. This way, a login stored in the cookie for one site will also apply to ...
  • 7,385
2 votes

Multi-Site | Multi-Domain?

One way to do this, is use different environments for each domain and set a variable (for instance, an entry ID) for each environment. So, your config/general.php would look something like this: ...
  • 6,318
2 votes

Multi-domain routing not working

I've found an answer, but I don't know if it's going to cause me any problems or not. Looking at the debug output in the JS Console I noticed that although $_GET['p'] was set correctly to subpath/...
2 votes
Accepted

Possible to share assets, templates and plugins across two domains but not all content?

As long as your sites are hosted on the same server, you can easily share templates and plugins between them by defining the appropriate path constants in the index.php files for your sites: define('...
2 votes
Accepted

Multi sites: should I use Craft 2 locales, or go with Craft 3 alpha?

Brandon has stated (on the CraftCMS Slack channel, so, sadly, not easily linkable here) that custom locales will automatically translate to sites when upgrading from Craft 2 to Craft 3. At this point,...
2 votes
Accepted

Live Preview in different languages on different top level domains

With the current implementation of Live Preview in Craft, using Live Preview across different top-level domains isn't possible due to the cross-domain policy (as you found out) along with a few others....
  • 66.7k
2 votes

Re-using path segments for an additional domain?

In Craft, there is no such thing as a "section path" – there's only the "Entry Template" path (which tells Craft which template to load when the URL for an Entry in that particular section is ...
2 votes

Multi domains in Craft 2 licensing

As long as the control panel is only accessible from one domain, I'd say you're within the license requirements. example.com and example.fr are different domains, and really no less different than ...
  • 1,332
2 votes
Accepted

How should I set up redirects from http://foo.com to http://www.foo.com

It's not really Craft related, but assuming that you use .htaccess you could set up rewrite conditions to redirect the request: # Rewrite Engine RewriteEngine On # force HTTPS RewriteCond %{HTTPS} ...
  • 1,064
2 votes
Accepted

Multi Site Multi Domain

I believe you need to use tweak the config/general.php file in order to have a baseUrl for a site that is a different domain name. 'siteUrl' => [ 'english' => 'https://www.mysite.com/', '...
1 vote

Setting Up Multiple Sites

Firstly the Craft install on your beta site, does it share the same database? Craft's multi-site setup is meant to use a single database. Secondly I'm not exactly sure what 'step 7' is asking me ...
  • 66.7k
1 vote

How to setup assets in multi site where each site should have its own assets?

I had the same question and here is a way to have assets in separate root folders using aliases with Site handles: How do I dynamically define Asset Volumes' Base URLs for different Sites?
1 vote

Multi-Site Licence

If the two different domains are for the same "site", i.e. they have common things between them you can share, then yes - you can use one license for them. Craft's multi-site functionality isn't ...
  • 66.7k
1 vote
Accepted

Structuring site with multiple subsites

As of this comment, Craft 3 is still in beta but you may want to consider it as your challenge sounds like the new Sites functionality may be a good fit. Sites, allow you to manage multiple websites ...
  • 13.3k
1 vote

Possible to share assets, templates and plugins across two domains but not all content?

You could make use of symbolic links. This works if your sites are: on the same system your system is running on a Linux server environment you have console access (ex. SSH) With symbolic links ...
  • 1,327
1 vote

Possible to share assets, templates and plugins across two domains but not all content?

You could use a deployment solution like Beanstalk to update both your template folders with one push. I would think you could use the same assets folder fairly easily as long as the folder lives ...
1 vote
Accepted

Two domains with two different templates

Yes it is possible. I have it done on a site which has some sub sites with different domain name. You set your multi-environment configs for each site/subsite. Then based on the domain the site is ...
  • 1,779

Only top scored, non community-wiki answers of a minimum length are eligible