We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 1829
    • 15 Posts
    Hello!

    I have ModX Revo 2.1.5-pl (traditional) and I'm trying to build a website with subdomains. The one of the ideas is to put all the assets files to the subdomain, and here is the problem. On the webserver I have:

    /var/www/vhosts/website.com/httpdocs - the main website, website.com
    /var/www/vhosts/website.com/lego.website.com - the subdomain lego.website.com, where I want to locate all the assets

    In /var/www/vhosts/website.com/httpdocs/core/config.php I have specified:
    if (!defined('MODX_ASSETS_PATH')) {
        $modx_assets_path= '/var/www/vhosts/website.com/lego.website.com/assets/';
        $modx_assets_url= 'http://lego.website.com/assets/';
        define('MODX_ASSETS_PATH', $modx_assets_path);
        define('MODX_ASSETS_URL', $modx_assets_url);
    }
    


    In the system settings I have:
    rb_base_dir = /var/www/vhosts/website.com/lego.website.com/assets/
    rb_base_url = http://lego.website.com/assets/

    The direcories /var/www/vhosts/website.com/lego.website.com/assets and /var/www/vhosts/website.com/lego.website.com/assets/components have 777 permissions.

    But if I am trying to install a new package, I have this errors:
    - unable to create directory assets/ located in: /var/www/vhosts/website.com/httpdocs/assets/
    - unable to create directory assets/components/ located in: /var/www/vhosts/website.com/httpdocs/assets/components/

    Roughly I have the same problem with phpThumbOf: http://forums.modx.com/thread/72054/phpthumbof-and-tv-images-located-on-the-subdomain-issue

    Any ideas?..
    [ed. note: antonlemon last edited this post 12 years, 5 months ago.]
      • 1829
      • 15 Posts
      p.s. problem is not nothing solving by clearing the cache smiley
        • 1829
        • 15 Posts
        I think I've found the solution! smiley

        I've created directories /var/www/vhosts/website.com/httpdocs/assets & /var/www/vhosts/website.com/httpdocs/assets/components with write permissions.
        After doing this I can install packages without errors. Moreover, all the package data is stored in the /var/www/vhosts/website.com/lego.website.com/assets/components directory.
        Looks like ModX checks the write permissions for /var/www/vhosts/website.com/httpdocs/assets & /var/www/vhosts/website.com/httpdocs/assets/components despite the different $modx_assets_path...