mod_fastcgi doesn't accept hostnames for 'host'. This is not according to Docs:ModFastCGI
Docs:ModFastCGI says you can use a hostname for host. This is not the case when I use a valid hostname in my configuration. In fcgi_establish_connection() you get the message:
"converting IP address failed for", host->host, "\nBe sure to specify an IP address here");
I use version 1.4.18.
Is there a reason why init_aton() is used iso gethostbyname() or getaddrinfo()?
Updated by schwern over 11 years ago
I'd like to add a "me too" here and request this be considered for a 1.4.x patch. Having to use IP addresses has added difficulties to maintaining an application server farm.
lighty + mod_fastcgi made that server farm a lot smaller than it would be with the equivalent Apache setup. :)
Updated by Olaf-van-der-Spek almost 11 years ago
I updated the docs so at least they are correct now :)
host is hostname/ip of the FastCGI process
host is hostname/ip of the SCGI process
How does mod_proxy do this? I'm sure proxies aren't limited to IP addresses.
Updated by gstrauss almost 5 years ago
- Subject changed from mod_fastcgi doesn not accept hostnames for 'host'. This is not according to Docs:ModFastCGI to mod_fastcgi doesn't accept hostnames for 'host'. This is not according to Docs:ModFastCGI
- Status changed from New to Fixed
I verified that the docs state to use IP address string:
Yes, mod_fastcgi, mod_scgi, and mod_proxy all require IP address string for host. None use DNS.
musings on supporting DNS:
DNS is possibly blocking. 'A' records could point to multiple IPs. Lookups might return both 'A' and 'AAAA' records, or 'CNAME' records. DNS record TTLs might need to be handled. The list goes on. Reliance on DNS, even if done only at startup, might result in apparent hangs if DNS is slow or not responding. I could see the possibility of having a configuration switch to enable use of DNS, so that admin could opt-in to this possibly blocking behavior, and I could see doing DNS lookups only at startup, and only taking the first address returned. Such a feature request might be sufficient to add convenience to the configurations of many -- not all -- usage scenarios. Async DNS is also a possibility, but all of the above is definitely a feature request (or multiple feature requests), and the changes required to implement them might not be appropriate for the 1.4.x branch.
Also available in: Atom