Alright- I had this setup right once. Then we changed the format of the subdomains on our development server, and I suddenly get Access Denied on any subdomain node. I can't edit the record settings or theme either, still Access Denied. I've checked all the permissions. The cookie domain is set to $cookie_domain = $_SERVER['SERVER_NAME'];.

I've uninstalled the module, deleted any trace of it in the database and started over twice, all ending back up at the Access Denied page. Why is this?

I am simply trying to do:

x.domain.com (parent site)
y.domain.com (child site, different theme and content)

Comments

agentrickard’s picture

Go to Admin > Content > Post settings and rebuild the node access permissions.

kevinquillen’s picture

Just did that, same result. Access Denied.

agentrickard’s picture

Well, it it's access denied for the admin pages, you need to go to Admin > User > Access Control and give yourself the proper permissions.

kevinquillen’s picture

All the boxes in permissions are checked off.

I've had this problem before when I first tried to set it up, and somehow got around it. I thought it dealt with cookie_domain, but I guess not.

kevinquillen’s picture

Pretty much at a loss here. I have no idea what changed so radically that now it doesn't work at all.

kevinquillen’s picture

Ok let me start from another angle, what would cause me to see this message right after installing it? We got around this a month ago somehow, but I can't recall.

agentrickard’s picture

Possibly it is $cookie_domain.

Are all your sites using the same domain -- e.g. example.com | one.example.com | two.example.com

If so, set $cookie_domain = 'example.com' -- I think the dynamic variable setting doesn't work as you expect.

If not, try the Single SignOn module.

kevinquillen’s picture

Gotcha. On the development server, we assign all the sites like projectname.developmentdomain.com, where cookie_domain being static would probably work.

But, when all sites go live (1 parent, 9 children in total) those children sites each have their own domain. So it won't be x.domain.com, y.domain.com anymore, it would be domain1.com (parent), domain2.com (child), and so on.

I'll try it out.

agentrickard’s picture

Status: Active » Closed (fixed)

That would require Single SignOn. This is a browser security issue, noted in the documentation.

kevinquillen’s picture

This fixed it for me, in settings.php:

$baseDomain = explode(".", $_SERVER['SERVER_NAME']);

$cookie_domain = $baseDomain[count($baseDomain) - 2] . '.' . $baseDomain[count($baseDomain) - 1];

Could change domains to whatever in the conf, DNS, and Domain settings, no Access Denied

mattwmc’s picture

Thanks for the fix! Worked for me as well!

dhirendra.mishra’s picture

Issue summary: View changes

#7 worked for me...