-
-
Notifications
You must be signed in to change notification settings - Fork 15.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tomcat: rewrite module #84377
tomcat: rewrite module #84377
Conversation
Responding so you know I'm not ignoring you :) I don't think I've used Tomcat via Nix or otherwise, but guessing you found me via #17879. Not sure I'll have much to add directly (since my interest is just transitively in finding out if Guacamole is a viable Teamviewer alternative), but @Shados and @jraygauthier may have thoughts arising from #48140. |
The
(Also, the descriptions of I don't have much time available, but I would like to follow the development of this module rewrite, and to help (at least by commenting/reviewing/testing). |
@pvgoran thanks for taking the time to comment. A couple questions:
|
Yes.
With a reverse proxy which lives on another machine connected via VPN. I'm also making local requests directly to Tomcat.
I don't think so. (SSL is handled by the reverse proxy.)
HTTP on 8080. |
Thanks for your comments @danbst. I've had some higher priority stuff get in the way of this lately but will eventually circle back around. |
c825617
to
e4dbd9f
Compare
@pvgoran thanks for your feedback. I've finally come back around to this PR. While still heavily WIP I'm making some progress and can somewhat address your points now.
More to come. |
@aanderse I didn't find time to reply yet. :( |
'' | ||
; | ||
|
||
serverXmlFile = pkgs.writeText "server.xml" '' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
by the way builtins.toXML
does not work for cases like this?
Than escaping would come for free and it might be also faster since it is directly implemented as a native function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll have to give that a try. Thanks @Mic92!
I marked this as stale due to inactivity. → More info |
There is an temporary editor file committed that should be removed as well. |
I marked this as stale due to inactivity. → More info |
Unfortunately I don't have reason to finish this. |
Motivation for this change
The current
tomcat
module suffers from a few shortcomings, such asnix
and NixOSssl
the user is encouraged to place a secret (keystore or certificate password) on the nix storeThings I'm proposing
A rewrite of the module which lists
tomcat
use cases and then provides solutions to these use cases, addressing the above mentioned shortcomings of the current module.After identifying some common use cases of
tomcat
that are relevant to me I have taken a very rough (and extremely incomplete) first pass at rewriting the module. Many optionsdescription
values are empty or incorrect (copy+paste from another module), but I wanted to start a conversation with interested parties to see how we might improvetomcat
on NixOS.Here is what I came up with:
8080
as is the default expressed inserver.xml
from upstreamtomcat
as a full featured web server on ports 80 and 443, PEM certificates provisioned by Let's Encrypt, requiring no keystore password in the nix storenginx
orapache-httpd
viamod_jk
or reverse proxy, wheretomcat
is installed on the same machine as your web servertomcat
over multiple servers and use something likeapache-httpd
ornginx
to load balance them, possibly using a self signed certificateWhat I want from you
@danbst @pvgoran @deliciouslytyped @tomberek @abathur as potentially interested individuals
Opinions, thoughts, comments, your use cases, module requests, examples, discussion of what I'm proposing is a good path forward or not. Minor review of code so far if you feel like it, keeping in mind it outs not complete. I have tested a few workflows, but not all yet.
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)