Skip to content
Grav 2.0 is officially stable. Read the announcement →
Archive

Multisite inheritance question

Started by Muut Archive 10 years ago · 34 replies · 3269 views
10 years ago

@-l-l- Setting up a site with sub-domains should be easy. Just configure them as usual and point them to the grav install (root directory e.g. html/grav). The rest does Grav.

But if you really insist on having subfolders as mutliple sites you either have to write up something for your own or put every sub-site into a different folder and consider Themer to use different themes.

10 years ago

Just started to play with directories as subdomains only give med "This site can’t be reached" so far ^^

10 years ago

Did you used my setup.php? It should work, really. Make sure that there is a user/sites/<subsite.with.domain>/pages folder.

10 years ago

digging in to it, thinking it is my virtual host messing the subdomain up...

10 years ago

@-l-l- when using subdomains keep this in mind from the docs:

If you choose sub-domains for structuring your website network, then you will have to configure (wildcard) sub-domains on your server in addition to the setup of your subsites in your user/sites directory.

How you do this depends on your environment, but I use MAMP Pro to setup local environments and it's super easy to handle subdomains using the Alias feature.

10 years ago

omg lol, sometimes is very nice to lear something new like vhost server alias can handle multiple urls, and wildcard! as always, many thanks for inputs.

@Sommerregen, very valid approach to make a pro plugin for it!
However subdir was just for educational purpose, now subdom is up and running and probably better for anything.

So about the previous mention regarding overriding plugins / themes or just parts of them from subdomain - eg, if a needed folder (or file) is missing from subdom -> get it from main. Would this be a valid thing to do from setup.php?

10 years ago

@-l-l- Glad you sorted it :-D I think you can now try it on your own. Use the above setup.php and create a theme in your subsite themes folder using theme inheritance and you will see some magic;)

10 years ago

oh there we got some goodies :D really nice!

10 years ago

Thanks for erything! Ill mos def read up

10 years ago

i'm totally lost. ok so i past your setup.phpon the folder www.

If i had a domain name with : www.toto.com
and a subdomain www.blog.toto.com

I have to create a folder in user named sites/blog.toto/pages ?

that's right ?

10 years ago

You need two folders actually. One user/sites/toto.com and another one user/sites/blog.toto.com with its own pages, accounts and config folders. Themes and plugins are shared between these two sites, but each can have its own themes and plugins in their folders themes and plugins respectively.

10 years ago

Wait, maybe you have to add the www in front, e.g. user/sites/www.toto.com and user/sites/www.blog.toto.com.

10 years ago

So each domain and subdomain will have its own admin control panel ? ( i'm trying the thing your wrote )

10 years ago

Yes, they have. They are independent from each other.

10 years ago

I have this /www/user/pages does not exist i put the pages folders on each.
user/sites/toto.com
user/sites/blog.toto.com

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1369 9 years ago
Archive · by Muut Archive, 9 years ago
2 942 9 years ago
Archive · by Muut Archive, 9 years ago
2 4069 9 years ago
Archive · by Muut Archive, 9 years ago
1 2960 9 years ago
Archive · by Muut Archive, 9 years ago
3 1125 9 years ago