Kryptronic Software Support Forum

You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.

#1 08-04-2017 10:35:29

lgt
Member
Registered: 11-21-2010
Posts: 272
Website

Multisite

How do I direct/redirect another website/IP for multisite?

I understand all the overrides in K9.









Offline

 

#2 08-07-2017 08:04:33

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Multisite

Thank you for asking.  I might as well list out what you do in K9 first, and that would be:

(1) Turn MultiSite on using System / Component / Settings / MultiSite.

(2) Configure a MultiSite by adding one using System / MultiSite / MultiSite Sites.  You'll see setup basically mirrors what you enter in the software installer for a new install, but in this case specific to the site/domain you're configuring as a MultiSite.

Then it's time to set up the MultiSite itself.  We're going to assume you're either using full SSL mode in version 9.0.1 and lower, or using an SSL URL as your main URL in version 9.0.2 and higher.  This means all sites will run SSL (primary/main site and MultiSite).  We'll also assume you're using the newer standard URL structure without a machine name, example: https://domain1.com for the primary/main site and https://domain2.com, https://domain3.com, etc. for any MultiSite(s).

(1) Configure a hosting account for your MultiSite so that you can access a robots.txt file on it via SSL without issues (https://domain2.com/robots.txt) .  This means DNS setup for the domain, putting the domain on it's own IP, configuring and purchasing an SSL certificate for it, and adding a robots.txt file to the web root for the MultiSite domain with the following contents:

Code:

User-agent: *
Disallow:
Sitemap: https://domain2.com/sitemap.xml

(2) Add a .htaccess file to your MultiSite's web root.  It's contents will be as follows.  Change 'domain1.com' to match your primary/main site's domain, and change 'MULTISITEID' to the id of the MultiSite you set up in K9.

Code:

#### Turn Rewite Engine On

Options +FollowSymLinks
RewriteEngine on

#### Static

RewriteRule ^robots\.txt$ robots.txt [L,PT]
RewriteRule ^favicon\.ico$ favicon.ico [L,PT]

#### Mirror Special: SiteMap

RewriteCond %{HTTPS} off
RewriteRule ^sitemap\.xml$ http://domain1.com/utilities/sitemap-MULTISITEID.xml [L,P]

RewriteCond %{HTTPS} on
RewriteRule ^sitemap\.xml$ https://domain1.com/utilities/sitemap-MULTISITEID.xml [L,P]

#### Mirror

RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ http://domain1.com/$1 [P]

RewriteCond %{HTTPS} on
RewriteRule ^(.*)$ https://domain1.com/$1 [P]

No changes are necessary to the .htaccess file for the main/primary site.  Just check it, though, to ensure that there are no domain-specific rewrites which would kill the MultiSite (ie make sure you don't have a rule that reads "if domain does not equal x do y").

(3) Add a favicon.ico file to your MultiSite's web root, or delete the line in the .htaccess file that references the favicon.ico file.

(4) If you have SiteMaps deactivated in K9, you can delete the 'Mirror Special: SiteMap' section from the .htaccess file.

(5) Locate the Apache Virtual Host file for your MultiSite domain.  It could be located at a path similar to /etc/httpd/conf.d/vhost_domain2.com.conf.  Virtual Host files typically have two sections, one for port 80 (standard http requests) and one for port 443 (https requests).  In the Virtual Host section for port 443, you will see an option for SSLCACertificatePath.  Do not modify that line, but right above it, add:

Code:

SSLProxyEngine On

Save your changes to the Apache Virtual Host file for your MultiSite domain.  No changes are necessary to the Apache Virtual Host file for your primary/main site.  Restart Apache Web Server when finished, then ensure you can access https://domain2.com/robots.txt without an error.

-----

At this point your MultiSite is set up and you can use K9's System / MultiSite / MultiSite Sites function to manage it (and all other MultiSites you set up) and configure any special settings, or settings overrides, choose a different skin, etc.  When you access https://domain2.com/, it should bring up K9 with the MultiSite active.


Nick Hendler

Offline

 

#3 08-09-2017 08:31:55

lgt
Member
Registered: 11-21-2010
Posts: 272
Website

Re: Multisite

I couldn't find the v_host file so I emailed my server host.  This was their reply:

Keep in mind those instructions are for a server without an admin panel. Your server has cPanel on it, so the instructions cannot be followed as-is.









Offline

 

#4 08-10-2017 08:04:46

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Multisite

Right, each different server type (cPanel, Plesk, Interworx, etc) store those vhost files in their own locations.


Nick Hendler

Offline

 

Board footer