You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Guild, Jason A (DOT)" <ja...@alaska.gov> on 2019/12/05 19:08:41 UTC

listing all applications in manager across configured virtual hosts

Hi all:

We have configured a Tomcat with two virtual hosts, one for hosting client-facing applications on a "vanity" name, and the other for the "machine" which hosts private URLs for access to admin/diagnostic functions by admins only.

We have an instance of Tomcat manager on the running just fine on the "machine" host.
Requests to "/manager/html/list" only shows applications running on the "machine" host, and not those running on the "vanity" host.

I understand from [0] that "If you have Tomcat configured to support multiple virtual hosts (websites) you would need to configure a Manager for each."

But if I request the complete server status from that same manager running on the "machine" host, the "Application list" heading in the output contains a listing of all deployed applications ordered by all configured virtual hosts.

Clearly the manager has knowledge of all configured applications regardless of virtual host.
Is is possible to configure a manager to just list all applications from all virtual hosts on the main "List Applications" screen?

My environment is Tomcat 9.0.29 with OpenJDK 1.8.0_232 on Debian Linux.

Thanks,
Jason

[0] https://tomcat.apache.org/tomcat-9.0-doc/manager-howto.html




Re: listing all applications in manager across configured virtual hosts

Posted by "Guild, Jason A (DOT)" <ja...@alaska.gov>.
The general idea seems like a reasonable use case.
Yes, I will look into it and see what I can come up with in terms of a 
patch we can try.
Jason

On 12/5/2019 1:08 PM, Christopher Schultz wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> Jason,
>
> On 12/5/19 14:08, Guild, Jason A (DOT) wrote:
>> Hi all:
>>
>> We have configured a Tomcat with two virtual hosts, one for hosting
>> client-facing applications on a "vanity" name, and the other for
>> the "machine" which hosts private URLs for access to
>> admin/diagnostic functions by admins only.
>>
>> We have an instance of Tomcat manager on the running just fine on
>> the "machine" host. Requests to "/manager/html/list" only shows
>> applications running on the "machine" host, and not those running
>> on the "vanity" host.
>>
>> I understand from [0] that "If you have Tomcat configured to
>> support multiple virtual hosts (websites) you would need to
>> configure a Manager for each."
>>
>> But if I request the complete server status from that same manager
>> running on the "machine" host, the "Application list" heading in
>> the output contains a listing of all deployed applications ordered
>> by all configured virtual hosts.
>>
>> Clearly the manager has knowledge of all configured applications
>> regardless of virtual host. Is is possible to configure a manager
>> to just list all applications from all virtual hosts on the main
>> "List Applications" screen?
>>
>> My environment is Tomcat 9.0.29 with OpenJDK 1.8.0_232 on Debian
>> Linux.
> Clearly, it's possible because you can see it on another screen within
> the manager. If all you want is a list (and not full management), then
> it should be fairly easy to accomplish.
>
> The Manager application isn't very complicated. Would you care to
> develop a patch/PR for this? I'd recommend making it somehow optional,
> as users with separate Managers for many many virtual hosts probably
> don't want all that exposed.
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/
>
> iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl3pf98ACgkQHPApP6U8
> pFgxBg//T+phrpFrqWXfFJjJK5cRd6udQez0Oe+HWls/xBvetuf3/iNqlGe40R6V
> R+oMxVM0Wvt70ZgCHAPCW0ccaVOE84eF1w81B6H9XGViUvgLTxF+e+hcyL3TT6Q4
> F1xSx8kGQS4T+f3SarY9YeTvnn56CRlPbLGasMGxY0ZvmI1WIeNaU7ZcLdPIZiWx
> H4A7d2/bs87NohKP5jff8GtzHmKXgaj5EzztUjQDeXCcKJBPrG1jAShehiMFCLZc
> f9LoY+l/ESgSxO+RChyfo25lzT6YhiG4xHb3x5TKjdMeHKq5pkzparifd/1MGPp3
> FQQHNp8+FYs1MnKOQ+PrEZ6KRLLXTgRYUVx1S9Vnl9QD3T0vr6yb62qpCApU6SRD
> sGyrQYHZreTh24MIGFrw5vcp7otZWOXcgpoADZyZ7sJdRHvnLFcc2V2e8xndfUIU
> EpDuHkpC5d43FPg19gws62c1lVBV8CpwN6ABo95xGe0gymMgfh6FF/atoL2GcHi2
> vr1lcEno8p6VW/yi+gLgCH85o3NygkTElx1GfJ0cns8Sw+GCHzy/SUXCeI5Kc8pH
> h4ITWUbMiSFwgcD86K7OwdOfjXqv0MJGZSDm5s5Xtse503SDRo1DGelerOsgpGpl
> x5mj1+iytve6FYsMIS7qPAu3KdSpkMXFRJG3fQRM+/fP1eAVIJY=
> =O90O
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

-- 
Jason Guild
Analyst/Programmer V
Alaska Department of Transportation & Public Facilities
Statewide Design & Engineering Services
820 E. 15th Ave.
Anchorage, Alaska 99501


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: listing all applications in manager across configured virtual hosts

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Jason,

On 12/5/19 14:08, Guild, Jason A (DOT) wrote:
> Hi all:
> 
> We have configured a Tomcat with two virtual hosts, one for hosting
> client-facing applications on a "vanity" name, and the other for
> the "machine" which hosts private URLs for access to
> admin/diagnostic functions by admins only.
> 
> We have an instance of Tomcat manager on the running just fine on
> the "machine" host. Requests to "/manager/html/list" only shows
> applications running on the "machine" host, and not those running
> on the "vanity" host.
> 
> I understand from [0] that "If you have Tomcat configured to
> support multiple virtual hosts (websites) you would need to
> configure a Manager for each."
> 
> But if I request the complete server status from that same manager
> running on the "machine" host, the "Application list" heading in
> the output contains a listing of all deployed applications ordered
> by all configured virtual hosts.
> 
> Clearly the manager has knowledge of all configured applications
> regardless of virtual host. Is is possible to configure a manager
> to just list all applications from all virtual hosts on the main
> "List Applications" screen?
> 
> My environment is Tomcat 9.0.29 with OpenJDK 1.8.0_232 on Debian
> Linux.

Clearly, it's possible because you can see it on another screen within
the manager. If all you want is a list (and not full management), then
it should be fairly easy to accomplish.

The Manager application isn't very complicated. Would you care to
develop a patch/PR for this? I'd recommend making it somehow optional,
as users with separate Managers for many many virtual hosts probably
don't want all that exposed.

- -chris
-----BEGIN PGP SIGNATURE-----
Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl3pf98ACgkQHPApP6U8
pFgxBg//T+phrpFrqWXfFJjJK5cRd6udQez0Oe+HWls/xBvetuf3/iNqlGe40R6V
R+oMxVM0Wvt70ZgCHAPCW0ccaVOE84eF1w81B6H9XGViUvgLTxF+e+hcyL3TT6Q4
F1xSx8kGQS4T+f3SarY9YeTvnn56CRlPbLGasMGxY0ZvmI1WIeNaU7ZcLdPIZiWx
H4A7d2/bs87NohKP5jff8GtzHmKXgaj5EzztUjQDeXCcKJBPrG1jAShehiMFCLZc
f9LoY+l/ESgSxO+RChyfo25lzT6YhiG4xHb3x5TKjdMeHKq5pkzparifd/1MGPp3
FQQHNp8+FYs1MnKOQ+PrEZ6KRLLXTgRYUVx1S9Vnl9QD3T0vr6yb62qpCApU6SRD
sGyrQYHZreTh24MIGFrw5vcp7otZWOXcgpoADZyZ7sJdRHvnLFcc2V2e8xndfUIU
EpDuHkpC5d43FPg19gws62c1lVBV8CpwN6ABo95xGe0gymMgfh6FF/atoL2GcHi2
vr1lcEno8p6VW/yi+gLgCH85o3NygkTElx1GfJ0cns8Sw+GCHzy/SUXCeI5Kc8pH
h4ITWUbMiSFwgcD86K7OwdOfjXqv0MJGZSDm5s5Xtse503SDRo1DGelerOsgpGpl
x5mj1+iytve6FYsMIS7qPAu3KdSpkMXFRJG3fQRM+/fP1eAVIJY=
=O90O
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org