On Wednesday 18 June 2003 10:11, [EMAIL PROTECTED] wrote: > <VirtualHost x.x.x.x> > DocumentRoot /home/version3/public_html/htdocs/ > ServerName version3.phs.org > ServerAlias version3 > CustomLog logs/version3_access_log combined env=!VLOG > ErrorLog logs/version3_error_log > LogLevel debug > ScriptAlias /cgi-bin/ "/home/version3/public_html/cgi-bin/" > > > <IfModule mod_rewrite.c> > > RewriteEngine on > RewriteLogLevel 9 > RewriteLog logs/version3_rewrite_log > RewriteRule ^(.*)styles\.html$ $1styles.css [R=permanent] > RewriteRule ^(.*)\.htm$ $1.shtml [R=permanent] > RewriteRule ^(.*)\.html$ $1.shtml [R=permanent] > </IfModule> > </VirtualHost> > The only other directive that is being used in the apache server is Server > Side Includes. > Within the /home/version3/public_html/htdocs directory I have two > directories that apache does not find, they are: > navigation & webtrends
I don't mean to be rude, but that is a *very* sloppy method of doing vhosts. Allow me to attach my vhosts config. With this config, icons still work in directory listings and cgi scripts work anywhere in a vhost's docroot. With this config, the directory hierarchy is in this fashion: "/www/www.foo.com/" where you place all of the content for www.foo.com in that directory. Now, let's say you want a different site (bar.foo.com) to have a different docroot: Just place all of bar.foo.com's docroot files in "/www/bar.foo.com/". The only complaint you may have with this method is that if you want foo.com to have the same docroot as www.foo.com, the best idea is to make a symlink. It just gets annoying when you're hosting 5+ domains like myself and you try to look at /www/. BTW, all off the <Directory > stuff is already in the vhosts, so it's really just a matter of including this conf. Also, you can feel free to delete the mt.cfg stuff, that's just for the MovableType blogs I host. Regards, -- Zack Gilburd http://tehunlose.com
# get the server name from the Host: header UseCanonicalName Off # splittable logs LogFormat "%{Host}i %h %l %u %t \"%r\" %s %b" vcommon CustomLog logs/access_log vcommon <Directory /www> Options Indexes FollowSymLinks MultiViews ExecCGI AllowOverride All Order allow,deny Allow from all </Directory> # now for the hard bit RewriteEngine On # a ServerName derived from a Host: header may be any case at all RewriteMap lowercase int:tolower ## deal with normal documents first: # allow Alias /icons/ to work - repeat for other aliases RewriteCond %{REQUEST_URI} !^/icons/ # allow CGIs to work RewriteCond %{REQUEST_URI} !^/cgi-bin/ # do the magic RewriteRule ^/(.*)$ /www/${lowercase:%{SERVER_NAME}}/$1 ## and now deal with CGIs - we have to force a MIME type RewriteCond %{REQUEST_URI} ^/cgi-bin/ RewriteRule ^/(.*)$ /www/${lowercase:%{SERVER_NAME}}/cgi-bin/$1 [T=application/x-httpd-cgi] # that's it! <Files mt.cfg> <Limit GET> deny from all </Limit> </Files>
pgp00000.pgp
Description: signature