Forum OpenACS Q&A: Response to some problem in virtual hosting on RH7

Collapse
Posted by Ken Mayer on
I struggled with the vhr stuff a long time ago, and finally gave up. Apache does a better job of that than AOLserver, so I let Apache do that (listen on port 80) and run a vanilla nsd on a localhost interface (127.0.0.1:8000). Here's a sample from my config:
Listen 80
NameVirtualHost 172.16.178.1:80

# Default, if the browser doesn't supprt named hosts
<VirtualHost _default_:80>
DocumentRoot /home/proxy/www
RewriteEngine on
RewriteRule ^.* /
</VirtualHost>

<VirtualHost 172.16.178.1>
ServerAdmin webmaster@bitwrangler.com
DocumentRoot /web/bw-dev
ServerAlias bw-dev.bitwrangler.com
ServerPath /bw-dev
RewriteEngine on
RewriteRule ^/bw-dev/(.*) http://127.0.0.1:8000/$1 [proxy]
RewriteRule ^/bw-dev      http://127.0.0.1:8000/   [proxy]
ProxyPass        / http://127.0.0.1:8000/
ProxyPassReverse / http://127.0.0.1:8000/
</VirtualHost>