Apache Vhost to proxy thru to lighttpd on a higher port.

Posted by ezmobius Tue, 08 Nov 2005 02:06:00 GMT


Apache 1.3.x:

<VirtualHost *:80>
    ServerName example.com
    ServerAlias www.example.com
    ProxyPass / http://example.com:8000/
    ProxyPassReverse / http://example.com:8000/
</VirtualHost>

Apache 2.x:
<VirtualHost *:80>
    ServerAdmin                 webmaster@username.tld
        ServerName              example.com:80
        ProxyRequests           Off
        ProxyPreserveHost       On
        RewriteEngine           On
        RewriteRule             ^/(.*) http://127.0.0.1:3000/$1 [P,L]
        ProxyPassReverse        / http://127.0.0.1:3000/
</VirtualHost>

5 comments

Comments

  1. Pat said 79 days later:
    Thanks for this, I'm helping a guy install a rails app using lighty proxied behind apache. Go figure a google search brings up your site. Hurry up on the book so I don't have to search anymore..
  2. Terry said 185 days later:
    Thank you SO much. I'm using Apache 2 and have been unwittingly using the Apache 1.3 syntax, trying to get it to work for about 2 weeks now. All it took was that little rewrite rule... You are a saviour.
  3. ogłoszenia nieruchomości said 307 days later:
    ogłoszenia nieruchomości, nieruchomości warszawa, nieruchomości, wynajem mieszkań, wynajmę mieszkanie warszawa
  4. big tits said 542 days later:
    Ruby block with link adding in a line seems to be useless, imho.
  5. nice ass said 543 days later:
    How to include PHP using smarty tags?

(leave url/email »)

   Preview comment