0

I just fixed my reverse proxy with apache to a jboss server, and finally it works I had to use AJP, not just reverse proxy because I had problems loggin in,

This is my server configuration which it doesnt make much sense to me, because when I was just using reverse proxy, on the proxypass I pointed to port 8080 to my jboss server, but here it is doing different. Anyways now it works perfect and I can log. All the css and js are diplayed, but when I go to www.mydomain.com I get the jboss root page, I want it to go to /catalogoBiologia instead, I was tweaking with proxypas and proxypassreverse but it is not working.

<VirtualHost *:80>
        ServerName www.mydomain.com
        ProxyRequests off
        ErrorLog logs/www.mydomain.com-error_log
        CustomLog logs/www.mydomain.com-access_log common

        JkMount /* ajp13_worker
</VirtualHost>

<VirtualHost *:80>
        ServerName reverse.mydomain.com
        ProxyPass /catalogoBiologia http://www.mydomain.com:80/
        ProxyPassReverse /catalogoBiologia http://www.mydomain.com:80/
</VirtualHost>
Juan Diego
  • 179
  • 1
  • 1
  • 11

1 Answers1

0

I think you should make a few smaller changes (Untested).

<VirtualHost *:80>
        ServerName www.mydomain.com
        DocumentRoot /www/catalogoBiologia
        ProxyRequests off
        ErrorLog logs/www.mydomain.com-error_log
        CustomLog logs/www.mydomain.com-access_log common

        JkMount /* ajp13_worker
</VirtualHost>

<VirtualHost *:80>
        ServerName reverse.mydomain.com
        ProxyPass / http://www.mydomain.com:80/
        ProxyPassReverse / http://www.mydomain.com:80/
</VirtualHost>

I think this will forward http://reverse.mydomain.com/ to http://www.mydomain.com/, and since I changed the DocumentRoot of www.mydomain.com to /www/catalogoBiologia this will be the default location of www.mydomain.com.

Of course this is only valid if you want to change the document root, but I kind of get the impression that you want http://www.mydomain.com/ to open up the catalogoBiologia stuff by default.

As I said, I have not tested this myself, but it might give you a few pointers and help you forward.

PS: /www/catalogoBiologia should of course match your path.

Qben
  • 248
  • 4
  • 9