Casey Bralla on 6 Feb 2010 11:00:36 -0800 |
I'm having some difficulty with apache2 and and mod rewrite and mod proxy on my Debian system. Lee Marzke (Thanks Lee!) was able to help me before, but I'm still not quite where I want to be. Here's what I'm trying to do: I want to send all http traffic for a specific virtual domain to a separate server. This __almost__ works. Here's what I've done so far: in the /etc/apache2/sites-available/newsite file, I've added this: <VirtualHost *> ServerName www.newsite.org RewriteEngine On RewriteRule ^/(.*)$ http://www.newsite.com/$1 [R,L] </VirtualHost> This works fine. When I enter http://www.oldsite.com into my browser, I am instantly taken to www.newsite.com. The only problem is that on my browser, the address shows the URL for newsite.com instead of the oldsite.com. (I don't want to user to see that I've moved the server.) I've also tried to use the proxy module, by doing this: <VirtualHost *> ServerName www.newsite.org RewriteEngine On RewriteRule ^/(.*)$ http://www.newsite.com/$1 [P] ProxyPassReverse / http://www.newsite.com/ </VirtualHost> But this gives me an "Internal Server Error" and this shows up in the apache error log: [warn] proxy: No protocol handler was valid for the URL /. If you are using a DSO version of mod_proxy, make sure the proxy submodules are included in the configuration using LoadModule. Can somebody suggest what I'm doing wrong and point me in the right direction? TIA! -- Casey Bralla Chief Nerd in Residence The NerdWorld Organisation http://www.NerdWorld.org ___________________________________________________________________________ Philadelphia Linux Users Group -- http://www.phillylinux.org Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce General Discussion -- http://lists.phillylinux.org/mailman/listinfo/plug
|
|