Varnish / Apache redirecting to backend port 8080
Posted
by
deko
on Server Fault
See other posts from Server Fault
or by deko
Published on 2011-08-20T20:02:57Z
Indexed on
2013/11/08
4:00 UTC
Read the original article
Hit count: 417
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
© Server Fault or respective owner