Jump to content

Multisite.module conflict with Processwire 2.6


robinc
 Share

Recommended Posts

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?

Link to comment
Share on other sites

Thanks, that's great.

At some point I may want to make it semi-automatic (one click add sub-site), so then I will look at just hooking into this functionality.

please let me know when you achieved that :)

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 mlfct
      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.
    • By humanafterall
      Hi,
      I'm looking at how I might achieve the following with Processwire:
      A low-bandwidth version of a website, on a subdomain (eg text.mydomain.com), where the content/database is exactly the same as the top level domain, but a new set of templates is used so the site is stripped back to just very simple CSS/low quality images.
      I'm looking and trying to work out what might be best — is it multi-site from the same database? Multi-instance? API? 
      Any guidance or experience of a similar setup would be much appreciated.
       
    • By Sébastien
      Hello everyone,
      I recently started using ProcessWire and already manage to accomplish several things on my own, but I keep asking myself a lot of questions, among which the following:
      After installing a multiple sites version (first method), everything works for now as desired, but I realize that all the files seem accessible by all the domains.
      Let's say that site1.com can access the asset files, template or other ressources of site2.com folders and vice versa by specifying only and for example:
      site1.com/path_to_a_site2_folder/one_file
      or
      site2.com/path_to_a_site1_folder/one_file
      Would you know if there is a simple way to prohibit this kind of behavior in order to clearly distinguish each site and thus ensure the confidentiality and separation of content?
      I prefer to avoid the entities to be considered as a single set by crawlers and prevent access the elements belonging to each domain from another domain.
      Thanks for your help. Sébastien.
    • By iipa
      Hi everybody!
      I have been reading about Multisite, but it kinda bugs me that every topic talks about having both admin and database same for multiple sites.
      I have a project where customer tests it by adding content to the site, while I still need to do some changes here and there in code, maybe some in database. If something crashes for a while, customer can't keep testing, which is a bit problematic.
      Is there any way that I could have two separate versions of one site ("production" and development) that share the same database, but are otherwise independent? Just the thought of having to migrate database every time I want to show client something new gives me anxiety 😁
    • By yrglx
      Situtation: website has been running for years without problems. We are implementing changes and setup a "dev" subdomain to be able to compare old and new.
      What went wrong: the hoster makes it possible to change the MySQL dbUser password. Which I accidentally did. Now the new password is not the same as the one defined in the config.php file under "$config->dbPass = ..." and the CMS cannot access the DB anymore. Nothing is working anymore!
      Assumptions: in config.php under "$config->dbPass = " the string saved is the salted hashed password, i.e. "myFreaking$difficultPassword" would be saved as f.ex. "jfeime7??6$$3!2". Is that right?
      What I need to be able to do: how can I generate that salted hashed password from the plain text password I entered on the host's webinterface for the dbUser?
      Or: do I just need to set "$config->dbPass" to the plain text password I entered on the hoster's webinterface to change de dbUser Password?
×
×
  • Create New...