Search code examples
apachedocument-rootproxypass

ProxyPass and DocumentRoot on one domain


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 content of my MyBB forum, which has its files inside the /var/www/forum directory. How to accomplish this?


Solution

  • 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