I'm trying to use the Drupalgap module in a site created using Aegir.

Drupalgap requires I put some files in a directory called mobile-application at the base of my drupal installation. Within mobile-application is a configuration file at http://www.example.com/mobile-application/app/settings.js where I need to specify the following path:

Drupal.settings.site_path = 'http://www.example.com';

Unfortunately as I am using Aegir's multisite setup I keep getting "Page not found". I've tried various different path settings such as;

Drupal.settings.site_path = 'http://www.example.com/sites/www.example.com';

Drupal.settings.site_path = 'var/aegir/platforms/drupal/sites/www.example.com';

I even tried creating a directory in called www.example.com.mobile-application and putting the contents of mobile-application inside it. That seemed to do something in that going to the url redirected me to http://www.example.com/install.php and resulted in this error; 403 Forbidden nginx

Anyone familiar with Aegir/multisite environments and Drupalgap?

  • 1
    A wild guess is that the vhost file redirects everything to index.php (as it normally should) and you may need to add an exception so that your webserver lets the request through without redirection.
    – Letharion
    Commented Oct 10, 2014 at 6:53
  • Where and how do I add an exception? Should I put it into /var/aegir/config/server_master/nginx/vhost.d/example.com ?
    – Meggy
    Commented Oct 10, 2014 at 10:35
  • 1
    I don't remember enough details about Aegir to know the answer to that question. Since it's a separate question, the best would probably be to open a new question about that, and see if anyone can help. Your much more likely to find people who know Aegir, than people who know both Aegir and DrupalGap.
    – Letharion
    Commented Oct 10, 2014 at 10:39
  • ref to your new question: drupal.stackexchange.com/questions/132259/… Commented Oct 15, 2014 at 11:15

2 Answers 2


Disclaimer: I use Aegir 2.x and never use the Drupalgap but I use root base files.

Create a new platform in Aegir (don't mess with the current platform) and create a new site. After that you must have something like: /var/aegir/platforms/platform_name/sites/new_site.com/

If you put your files in /var/aegir/platforms/platform_name/my_folder/my_script.js you can access them by all sites in the platform new_site.com/my_folder/my_script.js


site_path needs to be the root URL of the Drupal site, for example, http://www.example.com, and you need to set the path to your DrupalGap platform relative to the Drupal root, for example

drush @example.com vset drupalgap_sdk_dir sites/all/libraries/drupalgap-sdk
drush @example.com vset drupalgap_sdk_installed 1

DrupalGap does not need to be in the Drupal root.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.