Make apache/plesk proxy to lighttpd

I found out that you can use apache as a proxy to another server. ProxyPass does all of the magic. Since I plan to use lighttpd with rails apps running on another port, I created a fresh vhost.conf in the ~user/conf directory which is where Plesk keeps its config files. I added this line:

ProxyPass / http://anothersite.com:port/path/to/your/application/

Now, Plesk doesn’t include vhost.conf files by default, so you have to know about it.

/usr/local/psa/admin/sbin/websrvmng -u –vhost-name=yoursite.com

Restart the server:

/etc/rc.d/init.d/httpd restart

Enjoy!

1 Comment »

  1. ingo baab said

    Maybe just a typo?

    /usr/local/psa/admin/sbin/websrvmng -u –-vhost-name=yoursite.com
    dash was missing ———————^

RSS feed for comments on this post · TrackBack URI

Leave a Comment