I'm running Varnish 2 with Apache backend at 8080 on the same machine. Everything is working fine, except one problem: Sometimes Apache(?) is redirecting to backend port :8080 especially when I'm using htaccess. Users are displayed the 8080 port in the URL and Google is crawling my site on the backend port as well, which is not desirable.
I want Apache 8080 to be accessible only to Varnish on localhost, and not to redirect or display the backend port.
What would be a quick way to prevent users being directed to 8080 and search engines denied crawling the backend?
Here is an example htaccess line:
redirect /promotion /register.php?promotion=june
which causes www.domain.com/promotion to redirect to www.domain.com:8080/register.php?promotion=june