Hi! I'm trying to configure a cloud server so that it automatically forwards requests to ports 80 and 443 to
Tomcat using an Apache http port-listener/worker service thing.
In a broader sense, I'm trying to set this server up to host a series of web applications through Tomcat 7 so we can have a
test server at work that mirrors the production server. My boss asked me to set up the server we would use for the development environment, and yesterday a coworker asked me if I'd done the mod_jk stuff to it, because he wanted to set it up, but because this kind of thing is really the sort of thing I know the least about, I decided if it was ok with everyone I would really rather try to do it myself.
So, fast forward to today; I got my wish, and now I'm up a river without a paddle. It's not really that bad; this isn't the production site, so it's not incredibly time-sensitive, and my boss is fully aware that I hadn't even heard of this until yesterday, but I'm still getting stuck a lot here. Fortunately I had to do something like this about 4 months ago, and it was already set up on that server, so I've been doing a lot of comparing between the new server and that server, but I finally hit a roadblock that I can't really solve by doing that, and which is apparently too specific or technical for a google search.
I was having an issue where after I changed some things in the \etc\httpd\ configuration folders, httpd wouldn't start at all. Like; you go into ISP manager and go to "Services" and hit the green arrow, and... *nothing* happens. No log output, no "I tried to start but it didn't work

", nothing; but after combing through the log folder for a while and fiddling with some other settings I finally found a log file which was useful; the server boot log. It tries to start httpd on boot, but it fails, saying: Starting httpd: httpd: Syntax error on line 992 of <the config file>: Could not open configuration file /usr/local/mgr5/etc/ispmgr.inc: No such file or directory
[60G[[0;31mFAILED[0;39m]
Bingo. So I went back to the config file and found that line... I remember changing that line; in the old server it pointed to a different filepath because that one is running a slightly different version of ISP manager, so it was in a different place. I did change it though, so I know it's not just pointing at where it was in the old server. What's more interesting is when I first opened the config file on the new server and started looking through it, there was a line that said "Include /usr/local/mgr5/etc/ispmgr.inc", but that line was commented out. It was also in exactly the same location as the line "Include <path to ispmgr.inc on the other server>" in the old server's file, so I checked to see that the /usr/local/mgr5/etc/ directory existed and uncommented it. What I forgot to check though, was whether ispmgr.inc was *in* that folder.
Apparently this server has no file called ispmgr.inc. Since I'm not sure why it even wants to know where ispmgr.inc is in the first place though, I'm really not sure what I *should* have it look for instead, or if there should actually be an ispmgr.inc file there. I did a search for ispmgr.inc on the whole server,
So that's my specific problem, but I'd really just like to understand how these things work better as a generality. Like; for example, why are we even bothering with this mod_jk thing? I know there's a reason, but I don't know what that reason is. Instead of having a separate service listen on ports 80 and 443, then hand the request over to port 8009, which Tomcat then redirects to 8443, why don't we just have Tomcat listen directly to ports 80 and 443?
So... I know this whole process involves an Apache http server which receives requests, hands them to user/configuration-defined "workers", which; I'm not really sure how I should be conceptualizing these 'worker' things, are they a service? An object? A process that runs when called, then dies? What are these worker things? Also, I know mod_jk is involved in this, and you have to have it installed, but I'm not entirely sure how it works or how it's separate from the Apache http server or the workers. I know mod_jk is sort of the thing which actually *does* the connecting between Tomcat and the Apache server, but I'm not sure why they need to be connected; can't you just forward the request to the port and let it go from there? Also, there's a thing called AJP; it's some kind of protocol, but I'm definitely somewhat out of depth at this point; it looks like this is the thing that actually handles the proxying from whatever you put in to whatever port you're forwarded to... So you don't *actually* get redirected, you just put in blah.come/site, your browser requests
https://blah.com:443/site and you're served up the content located at
https://blah.com:8080/site... I think. I think that's how this works? I'm about 90% sure that there's numerous egregious errors in my understanding of this though... And if anyone knows what file I'm actually supposed to be including, that would be wonderful, but in a broader sense if anyone is super familiar with this stuff or knows where to find some good documentation that explains the relationship between all of these pieces, thus lending context to all of the explanations of the individual pieces, that would be great!