I installed Aegir
I installed platforms drupal-6.16 and openatrium-beta5 in /var/aegir/platforms directory

I created it on my local system using MAMP.

I setup a virtual domain: hosting.mysite.com which points to /var/aegir/hostmaster
I setup my localhost directory to point to /Users/auser/Documents/www

Now when Aegir creates a site, I am not sure what should be done so that I can actually view the site.

Comments

Anonymous’s picture

To view the site, visit the URL of the site name you gave it.

If it doesn't resolve, you need to configure DNS or edit your /etc/hosts file to resolve the site name to the IP address of your server (probably in your case, this is localhost).

Have a look at our documentation on configuring DNS, it includes steps for OS X. However, Bind DNS configuration might be a little outside your comfort level, so consider just editing your hosts file to begin with while you don't have lots and lots of sites.

socialnicheguru’s picture

I have MAMP Pro so I set the local resolution for my urls for my local machine.

mysite is build on managingnews platform so I have mysite pointing to /var/aegir/platforms/managingnews-1.0-beta8

I had to change permissions on the settings.php file to 444 for anything to work. It was 440.

then I got the following and a site is offline page:

Notice: Undefined index: db_type in /private/var/aegir/platforms/managingnews-1.0-beta8/sites/mysite/settings.php on line 3

Notice: Undefined index: db_name in /private/var/aegir/platforms/managingnews-1.0-beta8/sites/mysite/settings.php on line 4

Notice: Undefined index: db_user in /private/var/aegir/platforms/managingnews-1.0-beta8/sites/mysite/settings.php on line 5

Notice: Undefined index: db_passwd in /private/var/aegir/platforms/managingnews-1.0-beta8/sites/mysite/settings.php on line 6

Notice: Undefined index: db_host in /private/var/aegir/platforms/managingnews-1.0-beta8/sites/mysite/settings.php on line 7

Notice: Undefined index: db_type in /private/var/aegir/platforms/managingnews-1.0-beta8/sites/mysite/settings.php on line 9

Notice: Undefined index: db_user in /private/var/aegir/platforms/managingnews-1.0-beta8/sites/mysitesettings.php on line 9

Notice: Undefined index: db_passwd in /private/var/aegir/platforms/managingnews-1.0-beta8/sites/mysite/settings.php on line 9

Notice: Undefined index: db_host in /private/var/aegir/platforms/managingnews-1.0-beta8/sites/mysite/settings.php on line 9

Notice: Undefined index: db_name in /private/var/aegir/platforms/managingnews-1.0-beta8/sites/mysite/settings.php on line 9

Warning: Cannot modify header information - headers already sent by (output started at /private/var/aegir/platforms/managingnews-1.0-beta8/sites/mysite/settings.php:3) in /private/var/aegir/platforms/managingnews-1.0-beta8/includes/common.inc on line 148

here are the corresponding lines in settings.php

  $databases['default']['default'] = array(
    'driver' => urldecode($_SERVER['db_type']),
    'database' => urldecode($_SERVER['db_name']),
    'username' => urldecode($_SERVER['db_user']),
    'password' => urldecode($_SERVER['db_passwd']),
    'host' => urldecode($_SERVER['db_host']),
  );
  $db_url = "$_SERVER[db_type]://$_SERVER[db_user]:$_SERVER[db_passwd]@$_SERVER[db_host]/$_S
ERVER[db_name]";
q0rban’s picture

I've got this happening too with 0.4 Alpha 7 and MAMP. It seems to be acting like mod_env is not working or something, as the environment variables are not actually getting set. Must be a MAMP issue, but I can't figure out where.

q0rban’s picture

Status: Active » Fixed

Ok, I finally fixed this. This is indeed an issue with MAMP Pro. First of all, you need to make sure that you add the Include for your vhost.d folder in Mamp's httpd.conf:

sudo vi /Applications/MAMP/conf/apache/httpd.conf

At the end of this file add the following line, making sure you update the directory to match your setup:

Include /foo/bar/aegir/config/vhost.d/*

Then you need to remove the Hosts entry for your hostmaster site from the MAMP Pro interface. So if you set up your hostmaster site at http://aegir, remove the aegir host from MAMP Pro.

After this, edit /etc/hosts and add back the domain you just removed.

sudo vi /etc/hosts

127.0.0.1 aegir

'aegir' in this instance is the host name of my hostmaster site.

Restart MAMP, and you should be good to go!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

socialnicheguru’s picture

Status: Closed (fixed) » Active

I tried your steps but I still get the errors in #2.

adrian’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)
Issue tags: -aegir, -provision, -hostmaster

Automatically closed -- issue fixed for 2 weeks with no activity.