Hello all, Okay, so I read the links you gave me. http://www.zope.org/Documentation/Books/ZopeBook/2_6Edition/VirtualHosting.s tx http://www.zope.org/Members/Jace/apache-vhm http://www.zope.org/Members/bowerymarc/squid-zserver-virtual Starting from scratch, I created a zope user on my OpenBSD box, with a home directory of /home/zope. I then ran # /usr/local/bin/zope-instance /home/zope as root, to create an instance of Zope. # chmod -R zope:nobody /home/zope # su zope # /home/zope/start & To start Zope as user zope. I then logged into the site, created my /site1 and /site2 folders, and created a Virtual Host monster with mappings of: site1.ucdavis.edu/site1 site2.ucdavis.edu/site2 At this point, going to site1.ucdavis.edu goes to the main website, while going to site1.ucdavis.edu:8080 goes to the subfolder. So I think my Squid configuration is off. I went through /etc/squid/squid.conf and have the following options enabled (not commented out): http_port 80 acl QUERY urlpath_regex cgi-bin \? no_cache deny QUERY cache_dir diskd /var/squid/cache 100 16 256 emulate_httpd_log on auth_param basic children 5 auth_param basic real Squid proxy-caching web server auth_param basic credentialsttl 2 hours httpd_accel_host my.ip. httpd_accel_port 8080 httpd_accel_single_host on I'm confused about the ACL's in step 4 of http://www.zope.org/Members/bowerymarc/squid-zserver-virtual I don't see an acl of type webserver in squid.conf ... So what should that line be? acl ext-ip-addr site1.ucdavis.edu www.xxx.yyy.zzz/255.255.255.255 And then the ACL is ...? Http_access allow MATCH ext-ip-addr Clearly, the zope side of things are working so far. What is the SiteAccessEnhanced used for? Do I still need a site root in each virtual folder? Many thanks, --Adam -----Original Message----- From: Charlie Reiman [mailto:creiman@kefta.com] Sent: Friday, August 23, 2002 9:06 AM To: Marc Lindahl; Quentin Smith; Adam Getchell Cc: zope@zope.org Subject: RE: [Zope] Vhosting You should also read the 2.6 docs on VHM. They're downright tasty. http://www.zope.org/Documentation/Books/ZopeBook/2_6Edition/VirtualHosting.s tx They apply to 2.5.1 as far as I noticed.
-----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Marc Lindahl Sent: Thursday, August 22, 2002 11:42 PM To: Quentin Smith; Adam Getchell Cc: 'zope@zope.org' Subject: Re: [Zope] Vhosting
Try: http://www.zope.org/Members/bowerymarc/squid-zserver-virtual
on 8/22/02 10:15 PM, Quentin Smith at quentins@comclub.dyndns.org scrivened:
Hi- Use a Virtual Host Monster, one in the root of the site. Ideally, you should put Apache or Pound in front of Zope instead of squid, but you can use the Mappings tab of the Virtual Host Monster to define the virtual hosts. I used to use SiteRoots for my site, and none of the directions I found actually worked. HTH, --Quentin On Thursday, August 22, 2002, at 08:27 PM, Adam Getchell wrote:
Hello all,
I've read and re-read http://www.zope.org/Members/4am/SiteAccess2/vhosting a number of times.
I have a webserver that needs to host a bunch of different sites, site1.ucdavis.edu, site2.ucdavis.edu, etc.
I planned to use name based redirection, so I have c-names to the IP address of the server, i.e. site1.ucdavis.edu --> IP, site2.ucdavis.edu --> IP, etc.
I installed on OpenBSD, so Zope runs as an instance in /home/zoperoot under port 8080, and Squid sits in front of it and redirects from 80 to port 8080. This part is working fine.
Under my main zope site, I created two folders, site1 and site2. I then created, in each folder, an empty SiteRoot. That is, Title, Base, and Path are all blank. At least, that's how I interpreted the directions above.
I then created a DTML method called host_redirector, with the following content:
Extract the part of HTTP_HOST we care about, and declare our rewrite dictionary. <dtml-let hostname="_.string.upper(_.string.split(HTTP_HOST, '.')[0])" sitemap="{'SITE1': 'site1', 'SITE2': 'site2'}"> Do we have a match? <dtml-if expr="sitemap.has_key(hostname)"> Set the logical root: <dtml-call "REQUEST.set('SiteRootPATH', '/')"> Add physical root: <dtml-call "REQUEST['TraversalRequestNameStack'].append(sitemap[hostname])"> </dtml-if> </dtml-let>
Since I only care about the first part of the name, I rewrote the script from the example. It may be incorrect! I tried the equivalent at a python interpreter, but I may certainly have goofed up.
In the root folder, I Set an Access rule to host_redirector.
I changed the index pages in each of Site1 and Site2 to differentiate them. However, going to site1.ucdavis.edu gives the top level index_html, while going to site1.ucdavis.edu/site1 gives index_html in the Site1 folder, so clearly I did something wrong.
Any pointers?
*************************** * Adam Getchell AdamG@hrrm.ucdavis.edu * System Architect/Programmer (530) 752-1584 * Human Resources Information Systems http://www.hr.ucdavis.edu/ *************************** "Invincibility is in oneself, vulnerability in the opponent." -- Sun Tzu
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )