Nginx reverse proxy & AJP

Can anybody help please. I’m trying to set up the nginx.conf file with:

upstream tomcats {
server <TARGET_SERVER>:8009;
keepalive 10;
server {
listen 80;
location / {
ajp_keep_conn on;
ajp_pass tomcats;

I comment out the entire server block and append the above in the
http block. I then add the IP address and port of my target, replacing
<TARGET_SERVER>:8009, but I just can’t get it to work.

Please can someone give me a little guidance on this.

Many Thanks

Apologies, please ignore, I missed commenting out a curly brace.

listen 80; is supposed to be changed. Look at the note below it:

Note: If you are using Pwnbox, then port 80 will be in use already, so, in the above configuration change port 80 to 8080. Finally, in the next step, use port 8080 with cURL.

Many thanks onthesauce, that solved my next question. I got the port
80 error after sorting out a missed brace that I should have commented out to solve my previous issue.


No worries! Sounds like a pre-coffee mistake haha!

You’re not far off, coffee gone cold error :slight_smile: