JSF behind a reverse proxy

I am trying to deploy a JSF application behind a reverse proxy installation, with no success. The Apache reverse proxy has the following entries in the configuration:
ProxyPass /myApp http://localhost:8080/myApp
ProxyPassReverse /myApp http://localhost:8080/myApp
The application is running on jboss listening to port 8080 and behaves very well if I connect to http://server:8080/myApp.
When I invoke http://server/myApp, the redirection is done and I receive the core HTML of the page I requested, but all URLs inside the page are not correct, pointing to localhost:8080/myApp... As you understand, after a certain point the application is completely unusable.

Any ideas how I can configure myFaces ver.1.1 to make it generate relative URLs instead of absolute ones for everything if it doing?

Thank you in advance for your help

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

I don't think your directives are right. e.g. in ProxyPass the local path is meant to be mapped to a remote server. See

upcomltdAuthor Commented:
I use it already for other applications and it works without ANY problem! In terms of web, what's the difference between a localhost and a remote server???
The problem is that JSF uses absolute URLs to rewrite the URI of a component, being it an image, a form action or else.. If there was a way to tell it to create relative paths, everything would be ok - as is the case with other frameworks, like Struts, JSP, etc.
upcomltdAuthor Commented:
I found the solution for me in the following link:

It is enough to define the reverse proxy address in the Tomcat configuration.. It does not automatically pickup the URL the user typed, but at least it reverts it to something the user can use in the future. For example I typed: and because I had specified as proxyName="www.company.com" it immediately redirected me to http://www.company.com/myApp.
The important thing though is that it works well for all clients.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
>>what's the difference between a localhost and a remote server???

There's all the difference in the world. Localhost has no meaning to anything other than err...  the local host, so is not a good way to specify an address when your intentions span more than one machine. Use instead its hostname or IP address
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java EE

From novice to tech pro — start learning today.