in httpd.conf file 3) Remember i told earlier that when i hit "http://localhost:8080/stockwatcher/stockwatcher/stockPrices" url i get 405. That is what iexpect when i hit "localhost:80/stockwatcher/stockwatcher/stockPrices"
4)My apache tomcat runs on port 80, so i expect when i hit "localhost:80/stockwatcher/stockwatcher/stockPrices", it should redirect me to
5)My apache tomcat comes up fine,because when i try to access static content,it displays the html page
6)But when i give "http://localhost:80/stockwatcher/stockwatcher/stockPricesl"
get below error
Server Error (500 internal server error)
The server encountered an internal error or misconfiguration and was
unable to complete your request.
Please contact the server administrator, blah blah ......
Please help. . I have been trying for hours and searched the apache sitoo ,but iam unable to get it working
Someone says "Impossible is nothing". The man next him says "Let me see you licking your elbow tip!"
Actually, a proxy does not redirect you. Apache redirection actually returns a status with the redirect target URL in it to your client and the client then re-issues the request using that URL, if I'm not mistaken.
In contrast, the proxy actually rewrites the request to make it look like it originated from Apache itself, then forwards the rewritten request to Tomcat (or wherever). The ProxyPassReverse undoes that action so that the client thinks that Apache handled the request directly.
When mixing Apache and Tomcat, always pay attention to the format of the error page. Tomcat's error pages have distinct colorings among other things, and when you get a 500 error from Tomcat, that means that the proxy is more or less working, but that there was probably an Exception thrown in the Tomcat webapp's program code.
Customer surveys are for companies who didn't pay proper attention to begin with.
Joined: Dec 20, 2007
Yeah thanks for the info Tim.But the problem was that i only included "LoadModule proxy_module modules/mod_proxy.so". Later, i realised i might have to include "LoadModule proxy_http_module modules/mod_proxy_http.so" this as well.Now it redirects properly.Need to investigate the difference between those two modules.
Though above works fine, just wanted to know when do i need to use "AddModule mod_proxy.c". I saw it in apache site. But when i try to add this line in my httpd.conf file, the server itself doesnot start for me. I dont know why.Any idea?
I'm afraid that I get mine the lazy way. I'm using the OS-supplied httpd server and the requisite modules are all either setup properly in the core bundle or neatly packaged as self-configuring add-on packages. However, failing to load a module normally causes an immediate error, not the kind of subtle stuff you seem to be encountering.
Here is everything I use to proxy to a secondary server: