Hi Guys,

Just curious as a client had asked for us to setup a temporary vhost with the actual servers IP as to avoid showing the hostnames/domain to the end client for a demo.

1) I had to setup a new "default" vhost file which had the correct directives and works fine.
2) I know to update sites.php in the multi site array aliasing to redirect incoming traffic to the correct host that's also fine.

For what ever reason, Aegir is pulling the entries out of sites.php and I don't recall doing a site verify for this to occur.
Is there correct syntax to put this array information into local.settings.php to avoid the setting being overriden?
Or is there a better best practise method of achieving this?

Thanks in advance.

Comments

omega8cc’s picture

Project: Barracuda » Provision
Version: » 6.x-2.x-dev

It is managed by Aegir, so you shouldn't touch it, I think, and it can't be related to local.settings.php. Also, the question belongs to the upstream queue.

anarcat’s picture

Status: Active » Fixed

I am not sure what you are trying to do, but you are likely to want to use Aegir's alias feature. Once a platform is managed by aegir, your manual modifications to sites.php will be lost, I believe.

snlnz’s picture

Thanks for the responses.

Basically don't want to show the hostname to the end client for demo sites and it is cleaner to point them at an IP to look at the demo site.
rather than dah.myaegir.com I want to point them at 1.2.3.4 makes for a clean demo without a domain especially if the end client is through one of our own clients we wouldn't want that end client to see our domain instead of our clients domain.

It appears you can't just add an IP to the site aliases hence my question. If I create a default vhost and add an alias in sites.php I get the desired result.

Hope that's clearer?

anarcat’s picture

I believe that Aegir *does* allow you to specify IP addresses as hostnames, so that should already work, unless you have some local modifications to the code.

See also #1859478: Don't allow site domain names to be IP addresses.

omega8cc’s picture

I think snlnz is referring to BOA, where using IPs as a site name is denied already, because by default it is used for the Chive SQL manager extra vhost - at least on the default IP on the VM.

anarcat’s picture

Okay well, at any rate the bug here isn't with provision, which happily allows those. And I think we answered the original question: you can't edit sites.php - it's under Aegir's control.

snlnz’s picture

Project: Provision » Barracuda
Version: 6.x-2.x-dev »

So would it be appropriate to go back to the barracuda queue and look at how we can do this or custom override to sites.php?
Or shall I just take it that it's a one off and add it to the documentation if anyone wants/needs to do this?

Thanks

omega8cc’s picture

Status: Fixed » Closed (works as designed)

BOA will not modify Aegir behaviour and will not prevent taking over sites.php by Aegir. It would require serious hacking Aegir core and I don't see any reason to do it. You could simply use any other domain or subdomain as an alias since BOA will not allow you to use IP address as a site's name (it could even cause issues with cookies), for reasons already explained above.

snlnz’s picture

Fair enough. No push just curious. The method I used worked for the interim and you're absolutely right it's not worth being included as default.

Noticed major issues with cookies and had to keep adding
$cookie_domain 'sitename.com';
to the local.settings.php file which got painful.

Thanks for the response.

omega8cc’s picture

Did you open bug report about it? Maybe we have something to fix? We have a few improvements related to cookies and domain access module support in HEAD.

snlnz’s picture

I wasn't sure if this was a bug and thought because if it was just in this particular use case that it wouldn't be necessary?

omega8cc’s picture

Project: Barracuda » Octopus

Always submit an issue if you experience a problem not already covered in either issue queue or docs.