Bug 613669

Summary: JON Apache monitoring does not correctly detect virtual hosts when they are listening on more than one port
Product: [Other] RHQ Project Reporter: dsteigne
Component: PluginsAssignee: RHQ Project Maintainer <rhq-maint>
Status: CLOSED CURRENTRELEASE QA Contact: Corey Welton <cwelton>
Severity: high Docs Contact:
Priority: high    
Version: 1.3.1CC: lkrejci, loleary, rtimaniy, smurphy
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 2.4 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-08-12 16:48:20 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 577313, 601949    

Description dsteigne 2010-07-12 14:31:27 UTC
Description of problem:
JON Apache monitoring does not correctly detect virtual hosts when they are listening on more than one port. To resolve this issue I've found on Apache's website, http://httpd.apache.org/docs/2.2/vhosts/examples.html, if you are using the same IP with different ports, you will need a separate Virtual Host block for each port.

i.e.

Server configuration
Listen 80
Listen 8080

NameVirtualHost 172.20.30.40:80
NameVirtualHost 172.20.30.40:8080

<VirtualHost 172.20.30.40:80>

ServerName www.example.com
DocumentRoot /www/domain-80

</VirtualHost>

<VirtualHost 172.20.30.40:8080>

ServerName www.example.com
DocumentRoot /www/domain-8080

</VirtualHost>

<VirtualHost 172.20.30.40:80>

ServerName www.example.org
DocumentRoot /www/otherdomain-80

</VirtualHost>

<VirtualHost 172.20.30.40:8080>

ServerName www.example.org
DocumentRoot /www/otherdomain-8080

</VirtualHost> 

The customer believes this is an issue with JON's parsing of configuration files as Apache's VirtualHost directive is correct per Apache's documentation at http://httpd.apache.org/docs/2.2/mod/core.html#virtualhost, which indicates that more than one address and port number to be specified in a single VirtualHost directive.

Comment 1 Steve Murphy 2010-07-12 14:49:53 UTC
From http://httpd.apache.org/docs/2.2/mod/core.html#virtualhost:

<VirtualHost> Directive
Description:	Contains directives that apply only to a specific hostname or IP address
Syntax:	<VirtualHost addr[:port] [addr[:port]] ...> ... </VirtualHost>

Note that the syntax clearly indicates that more than one address and port can be specified per virtual host.  For example, the configuration below is completely valid in Apache and should be processed correctly within JON:


Listen 80
Listen 8080

NameVirtualHost 172.20.30.40:80
NameVirtualHost 172.20.30.40:8080

<VirtualHost 172.20.30.40:80 172.20.30.40:8080>

ServerName www.example.com
DocumentRoot /www/domain

</VirtualHost>

Comment 2 Charles Crouch 2010-07-12 16:26:12 UTC
Lukas, is this addressed by the apache changes going into 2.4?

Comment 3 Charles Crouch 2010-07-12 16:27:31 UTC
Triaged as urgent for investigation only, initially, since the release is so close. If changes are necessary, lets discuss before making them

Comment 4 Lukas Krejci 2010-07-12 16:46:51 UTC
This should be handled by the plugin that is going to be included with JON 2.4.

Comment 7 Charles Crouch 2010-07-13 14:21:46 UTC
*** Bug 613072 has been marked as a duplicate of this bug. ***

Comment 8 Steve Murphy 2010-07-13 14:27:18 UTC
If there is a test version that you would like us to run on our system to see if it resolves the issue, please let me know.

Comment 9 Charles Crouch 2010-07-21 20:45:09 UTC
Pushing this to ON-QA since it should be fixed in 2.4

Comment 10 Corey Welton 2010-07-22 03:58:03 UTC
QA Verified, vhosts on multiple ports are now showing up

Comment 11 Corey Welton 2010-08-12 16:48:20 UTC
Mass-closure of verified bugs against JON.