ProxyPass and DocumentRoot on one domain

fracz picture fracz · Apr 25, 2013 · Viewed 22.3k times · Source

Let's say I have the following configuration:

<VirtualHost domain.com>
    # Server names, admins, logs etc...

    ProxyVia On
    ProxyRequests Off
    <Location "/">
        ProxyPass http://localhost:8080/tomcat-webapp/
        ProxyPassReverse http://localhost:8080/tomcat-webapp/
        Order allow,deny
        Allow from all
    </Location>
</VirtualHost>

Now, I want the address domain.com/forum to display conent of my MyBB forum, which files are inside /var/www/forum directory. How to accomplish this?

Answer

fracz picture fracz · Apr 28, 2013

Actually, I resolved this problem with the following code:

ProxyPass /forum !
ProxyPass / http://localhost:8080/tomcat-webapp/
ProxyPassReverse / http://localhost:8080/tomcat-webapp/
Alias /forum /var/www/forum