PDA

View Full Version : comparing apache webserver config files


rgjordan
13-Apr-2009, 01:57 PM
I've noticed that in the comparison of differences of apache.conf config files with container tags, the highlighted differences are not properly delimited by container.

So the highligted difference appears as:
ServerName test.com
CustomLog "|/usr/sbin/rotatelogs /home/bea/apache/qa/httpd/logs/access/%Y_%m_%d.test.com.access_log 86400" custom
ErrorLog "|/usr/sbin/rotatelogs /home/bea/apache/qa/httpd/logs/error/%Y_%m_%d.test.com.error_log 86400"
Redirect permanent / http://test1.com/test1
</VirtualHost>
<VirtualHost>

instead of:
<VirtualHost>
ServerName test.com
CustomLog "|/usr/sbin/rotatelogs /home/bea/apache/qa/httpd/logs/access/%Y_%m_%d.test.com.access_log 86400" custom
ErrorLog "|/usr/sbin/rotatelogs /home/bea/apache/qa/httpd/logs/error/%Y_%m_%d.test.com.error_log 86400"
Redirect permanent / http://test1.com/test1
</VirtualHost>


file1:
<VirtualHost>
ServerName test.com
CustomLog "|/usr/sbin/rotatelogs /home/bea/apache/qa/httpd/logs/access/%Y_%m_%d.test.com.access_log 86400" custom
ErrorLog "|/usr/sbin/rotatelogs /home/bea/apache/qa/httpd/logs/error/%Y_%m_%d.test.com.error_log 86400"
Redirect permanent / http://test1.com/test1
</VirtualHost>
<VirtualHost>
ServerName test2.com
CustomLog "|/usr/sbin/rotatelogs /home/bea/apache/qa/httpd/logs/access/%Y_%m_%d.test2.com.access_log 86400" custom
ErrorLog "|/usr/sbin/rotatelogs /home/bea/apache/qa/httpd/logs/error/%Y_%m_%d.test2.com.error_log 86400"
Redirect permanent / http://test2.com/test2
</VirtualHost>


file2:
<VirtualHost>
ServerName test2.com
CustomLog "|/usr/sbin/rotatelogs /home/bea/apache/qa/httpd/logs/access/%Y_%m_%d.test2.com.access_log 86400" custom
ErrorLog "|/usr/sbin/rotatelogs /home/bea/apache/qa/httpd/logs/error/%Y_%m_%d.test2.com.error_log 86400"
Redirect permanent / http://test2.com/test2
</VirtualHost>


Thanks,

Rob

Aaron
15-Apr-2009, 03:04 PM
Thanks, Rob. If you increase or alter your Alignment settings (Alignment tab, under Session Settings of your Text Compare), do you get better Alignment results?

Tim
18-Apr-2009, 09:54 AM
Hi Rob,

I can't think of any way that BC would align the files in the way you expect. Our algorithms will always give priority to exact matches of lines at the top of the files.

Sometime in the future we may support comparisons that understand more of the structure of a file, keeping defined sections of text (such as <xx> .. </xx>) together.

rgjordan
23-Apr-2009, 01:10 PM
I saw a product demo last year for a product called mvalent integrity which was designed for enterprise configuration management and auditing. They've since been bought by Oracle. While the compare editor wasn't as good as bc3 and the product cost upwards of 100K, one cool feature was the ability to parse common file types such as xml config files, apache config files and many others into key/pair values and let you compare those values in multiple files/environments without having to look at all of the ugly formatting tags of the config file. I hope you'll introduce something like this in a future release of bc.

Thanks,

Rob

Craig
23-Apr-2009, 05:34 PM
Rob, is this (http://gemsres.com/photos/story/res/46160/fig1.jpg) what you were referring to? Are you looking for a comparison of more than 2 files? It also looks like it might be dedicated to just XML (or just apache) style files. Was it more generic than that?

rgjordan
28-Apr-2009, 08:46 AM
Yes that was the application. The application was able to parse almost any kind of config file into key/pair values and it had a feature so you can add your own parsing rules for formats that it did not know out of the box. Comparing N number of files would be nice, however I believe the feature of parsing files into key/pair values that are much easier for a user to review would add the most value to bc users. I still have a demo disc if you would like me to send a copy to you.

Rob

Craig
28-Apr-2009, 09:34 AM
Please do, I'd love to see it.

rgjordan
28-Apr-2009, 12:54 PM
You can email your contact info to robert@jordan2000.com and I will mail it out to you.

Rob

Aaron
28-Apr-2009, 02:47 PM
You can email it to support@scootersoftware.com (depending on file size)

or if it needs physical mailing, our address is here:
http://www.scootersoftware.com/index.php?zz=contact

I'll send a quick email with info, too.