Post by David OrdalWhat I need is some format for the VirtualHost directive that doesn't
require an IP or hostname, and then uses whatever IP the connection was made
on to do the hostname lookup for %V
Consider this:
<VirtualHost 1.2.3.4>
ServerName foo
...
</VirtualHost>
<VirtualHost 5.6.7.8>
ServerName bar
...
</VirtualHost>
The ServerName (%V) is already determined by the vhost configuration that
proftpd chooses to handle the incoming connection (based on the IP address
to which the client connected); I'm not sure why you need to look up the
ServerName based on the hostname of anything.
If you're trying to have the same <VirtualHost> configuration apply to all
of your connections, that you're using a <VirtualHost> for the wrong
purpose. You could simply place all of that configuration in the "server
config" context (i.e. outside of any <Global> or <VirtualHost> sections),
and place "DefaultServer on" in that "server config" section. The
"DefaultServer on" tells proftpd to use that config to handle a
connection, when no other matching <VirtualHost> section is found for the
incoming connection. This way, _all_ connections get your "server config"
configuration, regardless of the IP address to which they connected.
If you're running a proftpd older than 1.3.2, you might be encountering:
http://bugs.proftod.org/show_bug.cgi?id=3149
TJ
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The reasonable man adapts himself to the world: the unreasonable man
persists in trying to adapt the world to himself. Therefore all progress
depends on the unreasonable man.
-George Bernard Shaw
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~