I've got a webfacing server that I've chopped up into guests, one of which is running apache with some pretty basic virtualhost config. I have redirection working, but my virtualhost config needs the original destination to work out which set of pages the request should hit, so I'm only seeing the default server page.
Currently, my iptables rule looks like this:
-A PREROUTING -i eth0 -p tcp -m tcp --dport 80 -j DNAT --to-destination 10.10.10.2:80
Any pointers?
The problem is, any http(s) traffic to this box is being routed to the default set of pages, not the one appropriate for the originally requested domain.
The appropriate part from the virtualhost config:
#
# The document root + CGI-directories.
#
VirtualDocumentRoot /srv/%0/public/htdocs/
VirtualScriptAlias /srv/%0/public/cgi-bin/
(yes, those paths do exist - I've yanked /srv/ over from the apache box I'm replacing & retained owners/permissions/etc!)