LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Squid and virtualhosting (https://www.linuxquestions.org/questions/linux-networking-3/squid-and-virtualhosting-283988/)

lil_drummaboy 01-30-2005 04:16 AM

Squid and virtualhosting
 
Hi,

I have a issue with squid, it works fine but I need some advice. Here is my situation. I have an apache server with virtualdocumentroot's so any dir in /vhosts/<user>/htdocs becomes a subdomain using mod_vhost_alias and the "VirtualDocumentRoot /vhosts/<user>/htdocs/%1/" option. Aswell my DNS server is wildcarding to my webserver, therefore allowing a user to add a dir in /vhosts/<user>/htdocs/ and it then becomes a subdomain. Now to add to the complication, I am running a http-accelerating squid setup on the webserver. My apache is running on localhost:www and my squid is running on <IP>:www. Right now all my domains, including subdomains need to be listed in /etc/hosts like "127.0.0.1 domain.com www.domain.com media.domain.com" etc. It is obvious this defeats the purpose of my subdomaining system, here is my question. How can I make squid use any domain and subdomain easier without having to add it to /etc/hosts? I have thought about a bind server on my webserver pointing everything to 127.0.0.1 but I don't even know how to setup squid to do that. Even still, there should be an easier way then a 127.0.0.1 bind.

Any ideas would be great. Thanks.


All times are GMT -5. The time now is 05:53 PM.