In my case domain_request_name() returns:
example.com:1080 instead of example.com
Related issues:
#270983: Domain Access doesn't work with non-standard port
#334419: $_SERVER['HTTP_HOST'] has port number and regex doesn't strip it.
See similar solution:
http://drupal.org/node/126340#comment-524707
My Apache configuration:
RewriteEngine On
RewriteRule ^(.*) http://%{SERVER_NAME}:1080%{REQUEST_URI} [P]
Where Apache with PHP4 is connecting to different apache with PHP5.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | domain.module.patch | 402 bytes | kenorb |
Comments
Comment #1
kenorb commentedTested patch applied.
Comment #2
agentrickardThis is by design, see the documentation. The first issue you cite is the reverse of your issue. The purpose is to respect separate ports, not strips them off.
If you want port 1080 to resolve to port 80, use Domain Alias to issue a redirect, or reconfigure your DNS.
Comment #3
kenorb commentedThat not make sense.
When I'm going to example2.com which is domain id 2, my default domain is still id = 0. So domain module doesn't work at all in this case.
In the URL user don't see any port, in the address bar is: http://www.example.com/, but domain don't recognise that domain, because of proxy port which was already rewritten.
So I don't want that :1080 will be converted to :80, because in address bar browser don't have any port (it's transparent).
So I still don't get it why this patch can't be applied.