diff --git a/src/applications/config/check/PhabricatorSetupCheckBaseURI.php b/src/applications/config/check/PhabricatorSetupCheckBaseURI.php index 34bcfb9599..1a5671a737 100644 --- a/src/applications/config/check/PhabricatorSetupCheckBaseURI.php +++ b/src/applications/config/check/PhabricatorSetupCheckBaseURI.php @@ -4,6 +4,26 @@ final class PhabricatorSetupCheckBaseURI extends PhabricatorSetupCheck { protected function executeChecks() { $base_uri = PhabricatorEnv::getEnvConfig('phabricator.base-uri'); + + if (strpos($_SERVER['HTTP_HOST'], '.') === false) { + $summary = pht( + 'The domain does not contain a dot. This is necessary for some web '. + 'browsers to be able to set cookies.'); + + $message = pht( + 'The domain in the base URI must contain a dot ("."), e.g. '. + '"http://example.com", not just a bare name like "http://example/". '. + 'Some web browsers will not set cookies on domains with no TLD.'); + + $this + ->newIssue('config.phabricator.domain') + ->setShortName(pht('Dotless Domain')) + ->setName(pht('No Dot Character in Domain')) + ->setSummary($summary) + ->setMessage($message) + ->setIsFatal(true); + } + if ($base_uri) { return; } diff --git a/src/docs/configuration/configuration_guide.diviner b/src/docs/configuration/configuration_guide.diviner index e8a2e5765b..b5e2c5c69d 100644 --- a/src/docs/configuration/configuration_guide.diviner +++ b/src/docs/configuration/configuration_guide.diviner @@ -30,6 +30,9 @@ some subdirectory of an existing website. Navigate to whatever domain you're going to use and make sure Apache serves you something to verify that DNS is correctly configured. +NOTE: The domain must contain a dot ('.'), i.e. not be just a bare name like +'http://example/'. Some web browsers will not set cookies otherwise. + Now, either create a VirtualHost entry (to put Phabricator on a subdomain) or edit the Directory entry for the DocumentRoot. It should look something like this: