Discussion in 'Feedback/Feature Requests' started by dlhhyct, Oct 29, 2006.

  1. dlhhyct

    dlhhyct Active Member

  2. mistwang

    mistwang LiteSpeed Staff

    Rewrite only works when everything is on the same server, just the URLs/Hosts are different, as the example you gave.

    As to what you want at the beginning of the thread, rewrite does not work. Maybe a reverse proxy to works, if the request without any change can be processed by yahoo.

    For the forward proxy feature, it is not trivial, we can put it on our to-do list, but I am not sure when it will be implemented.

    So, if the reverse proxy does not work, you need to setup Apache or lighttpd behind LSWS for the proxypass feature, or, you can also try some off shelf cgiproxy scripts written in perl or PHP.

    Good luck. :)
  3. dlhhyct

    dlhhyct Active Member


    I have to find a good clean solution instead of just throwing whole bunch of stuff together. Thanks.
  4. rlance

    rlance New Member

    example, please

    Yes, indeed, I would be grateful to learn how to accomplish the forward and reverse proxy via rewrite. Could you provide an example?
  5. SoreGUms

    SoreGUms Active Member

    Resurrecting an old thread is always fun... I need to do something similar to the OP.

    In apache you do this:

    ProxyPass /pytest/
    ProxyPassReverse /pytest/

    ProxyPass /pydev/
    ProxyPassReverse /pydev/

    This allows me to use the following URLs in my AJAX comms: - goes to the .8:8086/py/ host - in the log file the request is for /py/ not /pytest/ - goes to the .34:8086/py/ host - in the log file the request is for /py/ not /pydev/

    How do I do the above in LSWS?

    As it stands in v3.3.15 I see I can add
    TEST =
    DEV =
    as webservers. Then on the vhost I can set a proxy context as
    URI: /pytest/
    Webser: TEST

    but when I do
    the result that gets passed through is
    I need that to be

    How do I do what I want in LSWS? At the moment it looks like I don't and I uninstall LSWS and use Apache or something that can... I don't want to do this
    Thanks :)
  6. mistwang

    mistwang LiteSpeed Staff

    With Enterprise edition, you should be able to rewrite the URL from "/pytest/" to "/py/" with rewrite rule, however, LSWS will not do any link rewrite in response body.
  7. Marcus

    Marcus Well-Known Member

    NginX can too, and I agree that it would probably be a very useful feature.

    It should be pointed out, though, that if it were to be implemented, that users should make sure not to turn their server into an open proxy unintentionally. Many hosting companies would have problems with this, and it would negatively impact on server performance. This might be something to mention in the documentation, were it to be implemented.
  8. mistwang

    mistwang LiteSpeed Staff

    Nginx proxy module is "an HTTP/1.0 proxy without the ability for keep-alive requests", it is a reverse proxy, not a squid like forward proxy.

    The same function is present in LiteSpeed long time ago, and HTTP/1.1 keep-alive is always used for maximum performance, even when the client request is HTTP/1.0.

Share This Page