Bug 613669 - JON Apache monitoring does not correctly detect virtual hosts when they are listening on more than one port
Summary: JON Apache monitoring does not correctly detect virtual hosts when they are l...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RHQ Project
Classification: Other
Component: Plugins
Version: 1.3.1
Hardware: All
OS: Linux
high
high
Target Milestone: ---
: ---
Assignee: RHQ Project Maintainer
QA Contact: Corey Welton
URL:
Whiteboard:
: 613072 (view as bug list)
Depends On:
Blocks: jon24-apache jon-sprint12-bugs
TreeView+ depends on / blocked
 
Reported: 2010-07-12 14:31 UTC by dsteigne
Modified: 2018-10-27 16:15 UTC (History)
4 users (show)

Fixed In Version: 2.4
Clone Of:
Environment:
Last Closed: 2010-08-12 16:48:20 UTC
Embargoed:


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.