[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-users] Modifying httpd.conf



Hostmaster wrote:

> I wanted to make sure that first of all it was possible as I'm used to
> having complete control of the config file on my virtual server. One thing
> which is strange is the use of the three config files instead of just the
> one. This practice was done away with long ago at apache so I'm wondering if
> I can combine them as is standard practice.

I wouldn't.  If the Interface uses the three files you'll end up with a
real mess.

> I've found the setup on the Cobalt unecessarily complex especially the
> <VirtualHost> section. Take a look at a comparison below of my virtual
> server compared to the Cobalt. Why on earth they would need to use
> RewriteEngine directives for a standard Apache feature is beyond me but I'm
> no expert.

They use complex Rewrite directives for two reasons:  one, so
<www.domain.com> and <domain.com> will point to the same place, yet
change the browser to show what they consider to be the "correct"
<www.domain.com> in the browser location window.

And two, so that their /admin, /siteadmin, and /useradmin extensions to
URLs will work.

> Also, things like "AddHandler server-parsed .shtml" should be able to be
> added once in the standard configuration and be inherited by all other
> domains in name based hosting. Is the problem here that it's using IP based
> hosting? If so, how do we change this in the UI?

The RaQs use name-based hosting, but they use the IP# as the name <wry
grin>.  I never saw this before.  Very nonstandard.  They do it this way
so that you can host a site today, and it works as IP# based, but add
another site tomorrow at the same IP# and they both work as name.based.

I wouldn't attempt to change this; too complicated.

> Any and all thoughts would be most apreciated.
> 
> ####################
> Virtual Server
> ####################
> # point www.mydomain.com to subdirectory mydomain
> <VirtualHost www.mydomain.com mydomain.com>
> ServerName www.mydomain.com
> ServerAdmin admin@xxxxxxxxxxxx
> DocumentRoot /usr/local/etc/httpd/vhosts/mydomain
> ErrorLog vhosts/mydomain/logs/error_log
> Alias /icons/ /usr/local/etc/httpd/icons/
> ScriptAlias /cgi-bin/ /usr/local/etc/httpd/cgi-bin/
> </VirtualHost>
> 
> ####################
> Cobalt
> ####################
> <VirtualHost 216.98.132.117>
> ServerName www.mydomain.com
> ServerAdmin admin
> ServerAlias mydomain.com
> DocumentRoot /home/sites/site1/web
> RewriteEngine on
> RewriteCond %{HTTP_HOST}                !^216.98.132.117(:80)?$
> RewriteCond %{HTTP_HOST}                !^www.mydomain.com(:80)?$
> RewriteRule ^/(.*)                      http://www.mydomain.com/$1 [L,R]
> RewriteOptions inherit
> AliasMatch ^/~([^/]+)(/(.*))? /home/sites/site1/users/$1/web/$3
> AliasMatch ^/users/([^/]+)(/(.*))? /home/sites/site1/users/$1/web/$3
> AddHandler cgi-wrapper .cgi
> AddHandler cgi-wrapper .pl
> AddHandler server-parsed .shtml
> AddType    text/html     .shtml
> </VirtualHost>
-- 
Jeff Lasman <jblists@xxxxxxxxxxxxx>
nobaloney.net
P. O. Box 52672
Riverside, CA  92517
voice: (909) 787-8589  *  fax: (909) 782-0205