comparing apache webserver config files

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rgjordan
    Enthusiast
    • Oct 2007
    • 31

    comparing apache webserver config files

    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
    Team Scooter
    • Oct 2007
    • 15997

    #2
    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?
    Aaron P Scooter Software

    Comment

    • Tim
      Team Scooter
      • Oct 2007
      • 786

      #3
      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.
      Tim T Scooter Software

      Comment

      • rgjordan
        Enthusiast
        • Oct 2007
        • 31

        #4
        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

        Comment

        • Zoë
          Team Scooter
          • Oct 2007
          • 2666

          #5
          Rob, is this 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?
          Zoë P Scooter Software

          Comment

          • rgjordan
            Enthusiast
            • Oct 2007
            • 31

            #6
            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

            Comment

            • Zoë
              Team Scooter
              • Oct 2007
              • 2666

              #7
              Please do, I'd love to see it.
              Zoë P Scooter Software

              Comment

              • rgjordan
                Enthusiast
                • Oct 2007
                • 31

                #8
                You can email your contact info to [email protected] and I will mail it out to you.

                Rob

                Comment

                • Aaron
                  Team Scooter
                  • Oct 2007
                  • 15997

                  #9
                  You can email it to [email protected] (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.
                  Aaron P Scooter Software

                  Comment

                  Working...