Proxy Pass

Hi,

I have setup virtual host in apache2 as below

ServerAdmin smohanty@xxxx.com

ServerName xxxx.com

ServerAlias www.xxxx.com

DocumentRoot /srv/www/xxxx.com/public_html/

ErrorLog /srv/www/xxxx.com/logs/error.log

CustomLog /srv/www/xxxx.com/logs/access.log combined

ProxyPass /ShoppingCart http://localhost:8080/

my requirement is that when i hit www.xxxx.com it should hit my tomcat (which is running in 8080) application ShoppingCart. Now when It returns me page not found.

Need your support to complete it.

Regards,

Sanjay

1 Reply

I think to meet your requirement you need the configuration to be like this

ProxyPass / http://localhost:8080/ShoppingCart

I am not 100% sure, I think this is right. The way you have it setup you would be need to go to www.xxxx.com/ShoppingCart and you would get the Tomcat main menu.

The first parameter in ProxyPass is the path in the URL, and the second is what to point it too.

Normally it would be like this:

ProxyPass /ShoppingCart http://localhost:8080/ShoppingCart

This is who you get Apache to front tomcat (the easy way).

Thy these or a few variations and see how it works out. Reload Apache after each change. I got this info here ~~[http://tomcat.apache.org/tomcat-6.0-doc/proxy-howto.html" target="_blank">](http://tomcat.apache.org/tomcat-6.0-doc … howto.html">http://tomcat.apache.org/tomcat-6.0-doc/proxy-howto.html](

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct