Description of problem: When starting httpd using a non-standard configuration file (using the -f parameter), incorrect included configuration files are loaded by the plugin if the main configuration file redefines ServerRoot. Version-Release number of selected component (if applicable): 3.0.0 How reproducible: always Steps to Reproduce: 1. Create a directory (DIR) somewhere and create DIR/conf, DIR/conf.d/, DIR/logs directories. 2. Create a new httpd.conf with some configuration and put it inside DIR/conf 3. Define a ServerRoot directive in your httpd.conf and set it to DIR 4. Make sure your httpd.conf contains "Include conf.d/*.conf" directive 5. Put an additional configuration file defining a vhost in DIR/conf.d, call the file vhost.conf for example 6. Start httpd from command line like "httpd -f DIR/conf/httpd.conf -k start" 7. Let RHQ discover that apache instance Actual results: The vhost defined in DIR/conf.d/vhost.conf isn't discovered. Expected results: The vhost should be discovered. Additional info: This is because the plugin doesn't reload the configuration when it detects new value for the ServerRoot directive and thus the config file parser always uses the default server-root location hardcoded in the httpd binary.
This appears to have gone into the release-3.0 branch so should be testable in JON2.4.1 http://git.fedorahosted.org/git/?p=rhq/rhq.git;a=commit;h=e8bfc17fde0d6f5bc837d2a96f230a8109114279
Verified on rhq-release branch 3.0.1 - build#422 Followed the steps to reproduce and started httpd using a non-standard configuration file (/NotBackedUp/conf/httpd.conf). Defined a ServerRoot directive in httpd.conf and set it to "/NotBackedUp". httpd.conf contains "Include conf.d/*.conf" directive. Placed additional configuration file defining vhost in /NotBackedUp/conf.d The vhost defined in /NotBackedUp/conf.d/vhost.conf is discovered successfully. Please refer attached screenshot.
Created attachment 459087 [details] Screenshot
Verified this against jon-server-2.4.1-SNAPSHOT build# 24. Started httpd using a non-standard configuration file (/NotBackedUp/conf/httpd.conf). Defined a ServerRoot directive in httpd.conf and set it to "/NotBackedUp". httpd.conf contains "Include conf.d/*.conf" directive. Placed additional configuration file defining vhost in /NotBackedUp/conf.d The vhost defined in /NotBackedUp/conf.d/vhost.conf is discovered successfully.
Bookkeeping - closing bug - fixed in recent release.