PDA

View Full Version : configurations in vhosts.conf


sample
11-30-2002, 09:17 PM
Hi,

I've just started to use DSM, and would like to know if adding the following simple commands in my vhosts.conf file would / would not break the control panel config.

CustomLog /usr/local/apache/domlogs/access_log combined
CustomLog "|/usr/local/sbin/cronolog /usr/local/apache/domlogs/%Y/%Y-%m-%d-access_log" combined

RewriteEngine on
RewriteCond %{REQUEST_URI} !^/(a|b|c)[a-z].* [NC]
RewriteRule ^/(a|b|c)[/]*(.*)$ /cgi-bin/$1.cgi?%{QUERY_STRING}&xx=$2 [NC]

Basically, I wish to use cronolog (www.cronolog.org) to rotate my log files - they're really great ;) - and I'm also using mod_rewrite. Methinks it shouldn't break, since the customlog is a external pipe and the rewriteengine only mods URLs..

Cheers

Staff
11-30-2002, 11:52 PM
DSM's apache parser allows for any custom modifications the administrator would like to make. This would include the modifications you described in your post.

You can add them either to the httpd.conf above the include entries or in the top of vhosts.conf

Just keep in mind DSM always rewrites vhosts at the bottom of vhosts.conf (and any other content in the file above it).

sample
12-01-2002, 10:36 AM
Great.. one more query:

mod_perl won't break the control panel, ie. if I install it on my apache server and use DSM's apache parser to configure it?

Staff
12-01-2002, 10:59 AM
mod_perl should cause no problems installed as a dso.

If you choose to recompile apache and install it staticly, then you will need to ensure you include requires modules as well (frontpage, ssl, etc). You also need to use the default apache prefix (/usr/local/apache). You can get a list of the modules currently compiled staticly into your http server by running /usr/local/apache/bin/httpd -l

Just based on the complexity of the second option, I think the first is a better choice, but either way will work.

The apache parser only deals with your vhosts.conf when you make a change to the config file through DSM (it in the underlying subsystem responsbile for changes to the vhosts.conf)