I asked the same question a while ago, but I guess I didn't put my question right. I'm trying to reverse proxy one whole virtual host domain to a subdirectory of another virtual host, something like this http://host2.com -> http://host1.com/host2.
Apache's default site file is this
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName "host1.com"
<Directory /srv/www/host1>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order deny,allow
Allow from all
</Directory>
DocumentRoot /srv/www/host1
WSGIScriptAlias / /srv/www/host1/apache/django.wsgi
</VirtualHost>
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName "host2.com"
ProxyRequests Off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPass / http://host1.com/host2
ProxyPassReverse / http://host1.com/host2
</VirtualHost>
At this moment, the problem is that whenever I go to http://host2.com it shows me http://host1.com instead of http://host1.com/host2. What am I missing? I'm not sure if it should matter, but host1 is hosted using Django with wsgi.