I'm running Apache as an HTTPS reverse proxy, with many real hosts proxied through a single VirtualHost (single public IP, wildcard certificate), using mod_rewrite and mod_proxy.
Basically, something like:
<VirtualHost *:443>
SSLEngine On
...
RewriteEngine On
RewriteCond %{SERVER_NAME} ^(server1|server2|server3)\.domain\.net$
RewriteRule ^/(.*)$ https://%{SERVER_NAME}/$1 [P] # Forward requests for listed servers
RewriteRule ^.*$ - [F] # Block anything else
</VirtualHost>`
Now I need to set Timeout to a larger value than default, but only for requests going to one of these servers (sync server for mobile devices).
Can this be done without requiring a separate VirtualHost (and thus another public IP) ?
Having an extra VirtualHost doesn't demand a new public IP; your wildcard certificate will (I'm assuming?) be valid for the new sync server's listener.
Apache will gladly throw a warning when you set a
NameVirtualHost *:443
directive, but using host headers over an SSL connection will work just fine. Give your existing VirtualHost a wildcardServerAlias
and make sure it loads first.You can then make your second VirtualHost attached to the same IP (with a
ServerName
that gives it the requests for the mobile sync server).