I have been working locally on MAMP and now have deployed the site to Digital Ocean using this guide.
However I can't access the site. for page links I get the service unavailable error, and for the admin I get the 'Craft can’t connect to the database with the credentials in craft/config/db.php.'
error.
i have checked my database credentials many times and they match.
return array(
'*' => array(
'tablePrefix' => 'craft'
),
'000.00.000.00' => array(
'server' => 'localhost',
'user' => 'craftcms',
'password' => '************',
'database' => 'craft'
),
'localhost' => array(
'server' => 'localhost',
'user' => 'root',
'password' => '************',
'database' => 'craftdev'
),
);
my general config settings are as follows:
return array(
'*' => array(
//'siteUrl' => "//projectname:8888/html/",
'environmentVariables' => array(
'basePath' => '/users/toddpadwick/Sites/projectname/html/',
'siteUrl' => '//projectname:8888/html/',
),
'testToEmailAddress' => '[email protected]',
// Default Week Start Day (0 = Sunday, 1 = Monday...)
'defaultWeekStartDay' => 0,
// Enable CSRF Protection (recommended, will be enabled by default in Craft 3)
'enableCsrfProtection' => true,
// Whether "index.php" should be visible in URLs (true, false, "auto")
'omitScriptNameInUrls' => 'auto',
// Control Panel trigger word
'cpTrigger' => 'admin',
// Dev Mode (see https://craftcms.com/support/dev-mode)
'devMode' => true,
),
// Use IP address of your droplet below
'000.00.000.00' => array(
//'siteUrl' => 'http://000.00.000.00/',
'environmentVariables' => array(
'basePath' => '/var/www/html/',
'siteUrl' => 'http://000.00.000.00/',
),
// Default Week Start Day (0 = Sunday, 1 = Monday...)
'defaultWeekStartDay' => 0,
// Enable CSRF Protection (recommended, will be enabled by default in Craft 3)
'enableCsrfProtection' => true,
// Whether "index.php" should be visible in URLs (true, false, "auto")
'omitScriptNameInUrls' => 'auto',
// Control Panel trigger word
'cpTrigger' => 'admin',
// Dev Mode (see https://craftcms.com/support/dev-mode)
'devMode' => false,
)
);
Any help would be greatly appreciated!