Multiple Sites using Same Core

Permalink 1 user found helpful
I have 13 sites running C5 on the same server so I thought that centralizing the core would be great. I followed the directions here...
http://legacy-documentation.concrete5.org/tutorials/setting-up-and-...
They are written for legacy but I can't imagine that the directions would differ for my 5.7 installs (right??).

I used the symlink method and feel like everything is properly configured, but the site install does not seem to be referencing the shared core files and displays nothing.

Could it be a permissions thing?

THe attached image shows the link creation, the install directory with the symlink, and the contents of the symlinked directory.

Thanks in advance for any advice.
Chris

1 Attachment

 
PineCreativeLabs replied on at Permalink Reply
PineCreativeLabs
You may want to consider using one of these addons:

https://www.concrete5.org/marketplace/addons/domain-mapper...
https://www.concrete5.org/marketplace/addons/multiple-domains1...

Either of these will allow you to map multiple domains to a single Concrete install.
jasteele12 replied on at Permalink Reply
jasteele12
Are the permissions correct for the symlinked directory (i.e. readable by the webserver)? What do your error logs show?
Chrouglas replied on at Permalink Reply
Thanks for the reply.
The permissions for the Symlink are... lrwxrwxrwx 1 root root 64
the permissions for the linked dir are... drwxr-xr-x 21 username psacln 4096
(where 'username' is redacted)

This right? Its not this difficult right?
jasteele12 replied on at Permalink Reply
jasteele12
Depends. root/root doesn't look right to me, but it all depends on how the server is setup. If you created the symlink with the root account I doubt it would work (and I would be very afraid for that machine ;)

Is "username" the same as the webserver user? Or is psacln in the same group as the webserver? (They both have read-execute which looks fine, again server setup specific.)

Again, what do your error logs show?

Are you able to read with a browser http://yoursite.blah/concrete/css/app.css... ? Are you getting 403, 404 or other HTTP errors?

Running multiple sites off a single core is not that difficult if you understand the user/groups, permissions and server setup (these can be totally different on different hosting providers). If you don't know how to manage this stuff you are better off asking server support...

[Dear concrete5.org admins, please bring back the ability to drag the Post Reply dialog!]
Chrouglas replied on at Permalink Reply
I'm about to abandon this idea. But I HAVE gotten closer.
Needed to change the open_basedir setting to include /usr/local/share/applications ... duh.

and got the whole thing to work perfectly IF i set the permissions to each of the subscriptions' username.

So if i set ownership of the linked directory at /usr/local/share/applications/concrete5/concrete5.7.5.9/concrete to 'site1:psacln' it will work for Site 1 and only site 1. If I change the ownership to 'site2:psacln' it will work for Site 2 and again only site 2. I tried 'root' which is supposed to be a superuser of sorts but that doesnt work. If I combined all the sites under a single username then this would work but then admin and organization of the sites would be a nightmare.

logs show a whole lot of 'Symbolic link not allowed or link target not accessible' but access seems to only be denied to .js and .css files. The c5 login page DOES shows but it is unstyled and gives an error 'ReferenceError: jQuery is not defined' which again leads me to believe that the jquery.js file is being denied.

This is on MediaTemple DV using plesk with sites across multiple subscriptions. Their techsupport peeps do not think its possible so maybe it just isnt.

Any ideas?
Thanks,
C
jero replied on at Permalink Reply
jero
My guess it it's something to do with the way that you're running PHP. It sounds like you're using the suPHP method, and that can be very fussy about ownership of files etc, since it takes the uID to run as from the file's owner. It looks like you may be using a Plesk based environment and I believe it may be possible to switch over to using PHP-FPM instead. That ought to solve your permission issues, even allowing the shared core to be root/root if desired - and why not - it's never going to be writeable even if the bad guys get in. I have many c5 sites running with common cores using symlinks in exactly this way, using PHP-FPM.

Check out this linkhttps://support.plesk.com/hc/en-us/articles/213956705-How-to-use-PHP...
sk01 replied on at Permalink Reply 1 Attachment
sk01
symlink has to be created by the same user that servers the website.
and that user needs to have also access to the symlinked files.
see screenshot as example.
jasteele12 replied on at Permalink Reply
jasteele12
That's not necessarily true, but depends on the server setup.

For instance on this system the users are in the same group as the webserver, so as long as the directories are group execute and files are group readable it works.

On Dreamhost for example, its other, so no group access needed, but dirs o=x and files o=r

There are many different ways this can be setup by the OS and server admin...
sk01 replied on at Permalink Reply
sk01
yeah, but obviously root/root is wrong or hopefully the admin isn't running apache/nginx as root!!
yfsneals replied on at Permalink Reply
yfsneals
Are you still at it? Hate to lose you from the concrete5 family. I have a large number of shared sites running 8.2.1. We can compare notes...
https://www.concrete5.org/community/forums/customizing_c5/multiple-s...