Jump to content

[Solved] Multisite routing issues (with Plesk)


mlfct
 Share

Recommended Posts

Hey everyone,

i might have a weird issue with my multisite setup. Not sure though, if it is a user error from my side, a server configuration or a pw thing. I am using Soma's Multisite module to redirect different domains to different "sub"page-trees.

On my dev-server, i just manually setup two vhosts on apache to test the configuration and it worked flawlessly. Each domain routes correctly to the corresponding entry in the pagetree. 

My client on the other hand has to use Plesk to configure his webserver. So I setup two domains (domain1.com | domain2.com) there and pointed the domain2.com DocRoot to domain1.com's DocRoot (with the actual pw installation).

$config->httpHosts = [
    'domain1.com',
    'domain2.com',
    'domain3.com'
];

$config->MultisiteDomains = [
    'domain1.com' => [
        'root' => 'www.domain1.com', 
        'http404' => 27,
    ],
    'domain2.com' => [
        'root' => 'www.domain2.ch',
        'http404' => 27,
    ],
    'domain3.com' => [
        'root' => 'www.domain3.ch',
        'http404' => 27,
    ],

];


$config->httpHosts and $config->MultisiteDomains are properly set, but somehow when i am trying to load either of the two(or more) domains, it will always route to the first entry of the $config->httpHosts array.

Maybe someone could give me an idea or has worked with a similar setup, because i am feeling kind of blocked right now.

Thanks in advance!


--
EDIT

Embarrassingly enough, i just found the issue:
The Plesk default domain setting was redirecting to the www.* subdomain and this setting interfered with the actual routing. Sorry for the pointless thread-spam.

Edited by mlfct
Solution
  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Similar Content

    • By Peter Knight
      Is anyone here using WEBP as their output image format and what is your server / environment setup?
       I know there's support for it in PW lately and decided to investigate.
      Found it quite difficult to do this on a practical level. IE My current VPS is Cent OS 6 and Plesk and unless I'm wrong, WEBP is not supported by either.
      Which host and setup are you on that allows you to run WebP?
      Cheers
    • By clsource
      Hello,
      Processwire its present in Cpanel's Softaculous
      https://www.softaculous.com/apps/cms/ProcessWire
      But It's not present in Plesk APS.
      I think it's a good idea to create such aps and sent it to plesk for including them in their
      aps system.
      here is some info that I found.
      http://download1.parallels.com/Plesk/Doc/en-US/online/plesk-aps-overview/index.htm?fileName=69262.htm
      http://doc.apsstandard.org/2.1/start/
      http://kb.sp.parallels.com/en/115664
      anyone has any experience creating aps packages?

    • By robinc
      I am using the Multisite.module to run several (similar/related) websites off a single PW-site and database.
      Adding new sites was as simple as adding the domain to the config box, and a top level page of the same name.
      However, since an upgrade of PW, I now also have to update my site/config.php file with each extra domain, i.e.
      $config->httpHosts = array(
        'mydomain.com', // our primary hostname
        'related.mydomain.com', // related website  
        );
       
      Otherwise the site will throw a 404 page not found.
      Leaving a blank httpHosts will allow all hostnames, but causes a warning in the back-end
      Unrecognized HTTP host:'mydomain.com' - Please update your $config->httpHosts setting in /site/config.php
      Can anyone advise how best to update Multisite.module?
    • By Peter Knight
      Hi all
      Does anyone here create their PW sites on Plesk (12) on Linux on a VPS? I have a general web dev question for you.
      When you've created a web space and installed PW, does the Plesk Preview link ever work for you?
      I'm really interested in this as I'm new to VPS and Plesk and seem to be having issues with PW sites prior to the DNS propagation.
      My hosting company is telling me this a Plesk "feature" while someone else blamed PW.
      For example, have a look at my own site which does have the DNS kicked in.

      Clicking Preview brings up my site but none of the CSS loads and the paths are clearly broken.

      I've tried numerous combinations of changing the rewrite base  and yet nothing works.
    • By Peter Knight
      Hi guys
      I'm running PW on a VPS on Plesk for the first time and having some problems. The DNS hasn't yet kicked in so I have a funky IP address, port number and webspace name in the URL which aren't helping.
      I've obscured the real address here but you get the picture
      https://111.111.111.111:8443/sitepreview/http/mydomain.com/processwire/
      I can load up the login page but the css isn't mapping correctly and looks like

      Is it the htaccess I need to edit by changing 
        #   RewriteBase /
      to
      RewriteBase /sitepreview/http/mydomain.com/
      or something else? Currently above doesn't work.
      If I look at the source, the css is mapped as follows:
      <link type='text/css' href='/wire/modules/AdminTheme/AdminThemeDefault/styles/main-classic.css?v=12' rel='stylesheet' /> <link type='text/css' href='/wire/modules/Process/ProcessLogin/ProcessLogin.css?v=101' rel='stylesheet' /> <link type='text/css' href='/wire/templates-admin/styles/font-awesome/css/font-awesome.min.css?v=12' rel='stylesheet' /> <script type='text/javascript' src='/wire/modules/Jquery/JqueryCore/JqueryCore.js?v=183'></script> <script type='text/javascript' src='/wire/modules/Jquery/JqueryUI/JqueryUI.js?v=193'></script> <script type='text/javascript' src='/wire/templates-admin/scripts/inputfields.js?v=12'></script> <script type='text/javascript' src='/wire/modules/AdminTheme/AdminThemeDefault/scripts/main.js?v=12'></script>
×
×
  • Create New...