I have an AWS VM running Ubuntu with Apache2. I have two vhosts, both pointing to different Wordpress installs. I want to set up a Squid reverse proxy for only one of the vhosts.
My squid.conf reads:
http_port 80 accel defaultsite=wordpress.mysite.com no-vhost
cache_peer wordpress.mybackendserver.com parent 80 0 no-query originserver name=myAccel
acl our_sites dstdomain wordpress.mysite.com
http_access allow our_sites
cache_peer_access myAccel allow our_sites
cache_peer_access myAccel deny all
To test it, I set up an entry for wordpress.mysite.com in /etc/hosts pointing to the ip of the Squid server.
When I try to go to the site with the wordpress.mysite.com URL I get the default Apache2 home page.
Is there something I need to do in the http_port statement to get the url passed correctly to Apache so it can return the content for the right vhost?
Looks like it won't work unless I assign a unique IP to each vhost. I wound up using the underlying Apache server and implemented the reverse proxy that way. Worked fine on the first try.