Proxying experts?
by Timothy Miller from LinuxQuestions.org on (#50M9J)
So, never set up a proxy like this before (I'm used to just doing /folder to /folder), but according to the Apache manual on mod_proxy, it should work Quote:
Right now I'm setting it up on my test server to verify if it'll work. Test server is CentOS 8, production server will be CentOS 7, but should work with either one since they're both 2.4, just .6 vs. .37
http://epicenter2.stchome.com/tnIWEB
It should be proxying to an internal server port 8084 directory iweb.
Code:ProxyPass "/tnIWEB" "http://<internal server>:8084/iweb"
ProxyPassReverse "/tnIWEB" "http://<internal server>:8084/iweb"You can actually go to the URL (no, it isn't set up for https, this is just a test server and I snapshotted it today and moved it to the DMZ to test this, once I get it working (or give up) the server as running will be destroyed), and it'll get a 404.
Yes, I have verified the application actually IS running on the internal server, accessing it via <internal server>:8084/iweb loads fine.
Yes, mod_proxy is loaded and working (other proxies will work but I have them all disabled since this is only a test proxy server)
Apache error logs literally show nothing. Access logs show that I attempted to access it and it returned a 404, nothing more useful.
Code:10.0.3.148 - - [12/Mar/2020:03:00:09 -0700] "GET /tnIWEB HTTP/1.1" 302 -
10.0.3.148 - - [12/Mar/2020:03:00:18 -0700] "GET /iweb/ HTTP/1.1" 404 203
10.0.3.148 - - [12/Mar/2020:03:00:29 -0700] "GET /iweb/ HTTP/1.1" 404 203Doing things the way I'd NORMALLY do (/iweb to whatever/iweb) will work ABSOLUTELY FINE, but the proxied server is not under my control, and they want to call the app iweb there, but they want it called tnIWEB for the actual URL. Since the mod_proxy handbook shows things working like this, I would assume it's possible and I'm doing something stupid.


Reverse Proxy ProxyPass "/foo" "http://foo.example.com/bar" ProxyPassReverse "/foo" "http://foo.example.com/bar" |
http://epicenter2.stchome.com/tnIWEB
It should be proxying to an internal server port 8084 directory iweb.
Code:ProxyPass "/tnIWEB" "http://<internal server>:8084/iweb"
ProxyPassReverse "/tnIWEB" "http://<internal server>:8084/iweb"You can actually go to the URL (no, it isn't set up for https, this is just a test server and I snapshotted it today and moved it to the DMZ to test this, once I get it working (or give up) the server as running will be destroyed), and it'll get a 404.
Yes, I have verified the application actually IS running on the internal server, accessing it via <internal server>:8084/iweb loads fine.
Yes, mod_proxy is loaded and working (other proxies will work but I have them all disabled since this is only a test proxy server)
Apache error logs literally show nothing. Access logs show that I attempted to access it and it returned a 404, nothing more useful.
Code:10.0.3.148 - - [12/Mar/2020:03:00:09 -0700] "GET /tnIWEB HTTP/1.1" 302 -
10.0.3.148 - - [12/Mar/2020:03:00:18 -0700] "GET /iweb/ HTTP/1.1" 404 203
10.0.3.148 - - [12/Mar/2020:03:00:29 -0700] "GET /iweb/ HTTP/1.1" 404 203Doing things the way I'd NORMALLY do (/iweb to whatever/iweb) will work ABSOLUTELY FINE, but the proxied server is not under my control, and they want to call the app iweb there, but they want it called tnIWEB for the actual URL. Since the mod_proxy handbook shows things working like this, I would assume it's possible and I'm doing something stupid.