ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Multiple Site Manager template basepath

September 03, 2010 5:43am

Subscribe [6]
  • #1 / Sep 03, 2010 5:43am

    Richard Wiggins

    60 posts

    I have a 1.6.9 installation of EE. I have just purchased and partly set-up Multiple Site Manager (MSM), as I’m developing an additional site for the client.

    I have the basics working and have the 2nd (new) site running under it’s own domain name successfully. This has been set-up as new “site” on a dedicated server and that’s all good.

    The issue I have is with the ‘Basepath to Template File Directory’ as I work with templates locally. Firstly, am I able to host the templates within my new site folder structure, or do they have to reside within the original sites folder structure on the server?

    I would prefer to have the first method, so the new site templates reside within it’s own area on the server.

    If I can do this, how do I? I have already tried setting the path to ‘/var/www/vhosts/NEW-SITE-DOMAIN/httpdocs/assets/templates/’, but it fails when trying to save a template. The structure of that path is correct as that is the same as on the original site, but obviously with the different domain.

    Any help would be appreciated.

    Richard.

  • #2 / Sep 03, 2010 10:09am

    Ingmar

    29245 posts

    Firstly, am I able to host the templates within my new site folder structure, or do they have to reside within the original sites folder structure on the server?

    Yes, you can have separate directories per site. Most people will create their directory inside the normal “system” directory.

    If I can do this, how do I? I have already tried setting the path to ‘/var/www/vhosts/NEW-SITE-DOMAIN/httpdocs/assets/templates/’, but it fails when trying to save a template. The structure of that path is correct as that is the same as on the original site, but obviously with the different domain.

    Make sure that path exists and can be written to (permissions). Your host might be able to assist here as well.

  • #3 / Sep 03, 2010 3:12pm

    Richard Wiggins

    60 posts

    Yes, you can have separate directories per site. Most people will create their directory inside the normal “system” directory.

    But that doesn’t make sense. The secondary site doesn’t have it’s own “system” folder as it uses the main site’s “system” folder. I know that I could create another directory within the main site’s FTP area and write to it, but for tidiness and what I think makes sense, the templates for the new site should reside within the new sites FTP area.

    Make sure that path exists and can be written to (permissions). Your host might be able to assist here as well.

    That path does exist as I have used ‘whereami.php’ to check. I have also set the template folder permissions to 777 to ensure that it’s writeable.

  • #4 / Sep 03, 2010 6:22pm

    Sue Crocker

    26054 posts

    I know you’d prefer to work with templates in the same folder, but do they work if you use them on the initial site’s folder structure?

  • #5 / Sep 04, 2010 5:36am

    Richard Wiggins

    60 posts

    I know you’d prefer to work with templates in the same folder, but do they work if you use them on the initial site’s folder structure?

    Yes, I have tried that and they do work on the initial site’s folder.

  • #6 / Sep 05, 2010 2:48pm

    Greg Salt

    3988 posts

    Hi Richard,

    Have you confirmed with your host that writing files across virtual domains is possible? This may not be allowed in your environment.

    Cheers

    Greg

  • #7 / Sep 06, 2010 5:06am

    Richard Wiggins

    60 posts

    Hi Richard,

    Have you confirmed with your host that writing files across virtual domains is possible? This may not be allowed in your environment.

    Cheers

    Greg

    I know they have applied the open_basedir restriction from the original site up to the new site, but hasn’t resolved the issue.

    I haven’t confirmed that they can actually write though, so I’ll check with the server support.

  • #8 / Sep 06, 2010 10:40am

    Richard Wiggins

    60 posts

    To update, I have spent quite a while today trying to get this resolved with the server support, still to no avail. There is no reason why the master site (fullsupporthealthcare.com) shouldn’t be able to write to the new site (easirange.com).

    The current settings for both sites:
    php safe mode off
    php open base dir “none”
    The folders permissions on folder assets and templates 777 globally writeable/readable.

    I have now also tried to have a full server path and a relative path to the basepath template directory:

    ‘/var/www/vhosts/easirange.com/httpdocs/assets/templates/’
    ‘../../../easirange.com/httpdocs/assets/templates/’

    Not sure what else to try?  😖

  • #9 / Sep 07, 2010 4:12am

    John Henry Donovan

    12339 posts

    Richard,

    Currently what does your directory tree look like?
    Where does your new site sit in relation to your original installation files?
    I am looking for something similar to below

    -themes
    -images
    -system
    index.php
    path.php
    -site2
      -index.php
      -path.php

  • #10 / Sep 07, 2010 4:27am

    Richard Wiggins

    60 posts

    Hi John,

    No, not like that at all. They are set-up on the server as separate sites, so they each have their own domain, structure and FTP account.

    So each site is at the same level on the server:

    /var/www/vhosts/fullsupporthealthcare.com/httpdocs/  &  /var/www/vhosts/easirange.com/httpdocs/

    The original site:
    /var/www/vhosts/fullsupporthealthcare.com/httpdocs/
    -themes
    -images
    -system
    -assets/templates (where I keep my site assets and templates)
    index.php
    path.php

    The new site:
    /var/www/vhosts/easirange.com/httpdocs/
    -assets/templates (where I keep my new site assets and want to keep it’s templates)
    index.php
    path.php

    Hope that makes sense.

    Richard

  • #11 / Sep 07, 2010 2:33pm

    Brandon Jones

    5500 posts

    Hi Richard,

    Even without an open_basedir restriction I’d suspect the server is preventing cross-domain access. One suggestion would be setting up a simple PHP script that tries to write a file to the other domain, as that will be easier to troubleshoot with your host. Keep us posted.

  • #12 / Sep 08, 2010 7:59am

    Richard Wiggins

    60 posts

    Hi,

    I can confirm that this issue has now been resolved and I can save templates over the different sites.

    The server support team had dealt with the vhost.conf file and there was a typo (one too may ‘t’) in it.

    It was: /var/www/vhosts/fullsupporthealthcare.com/htttpdocs

    Should have been: /var/www/vhosts/fullsupporthealthcare.com/httpdocs

    Many thanks for all your help.

    Regards,

    Richard.

  • #13 / Sep 08, 2010 8:17am

    Ingmar

    29245 posts

    Very glad to see you’re all set. Please post again as needed.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases