Hi Nicolas,

I'm trying to access virtuoso server through an apache server, using
mod_proxy.
Calling http://www.mysite.net/virtuoso, it should redirect on my local
server on 88.191.91.72:8890 <http://88.191.91.72:8890>

NameVirtualHost 88.191.91.72

<VirtualHost 88.191.91.72>
    ServerName www.mysite.net <http://www.mysite.net>
...
     ProxyRequests off
<Proxy *>
          Order deny,allow
          Allow from all
</Proxy>
      ProxyPass /virtuoso/ http://172.16.12.128:8890/
      ProxyPass /virtuoso http://172.16.12.128:8890
      ProxyPassReverse /virtuoso/ http://172.16.12.128:8890/
      ProxyPassReverse /virtuoso http://172.16.12.128:8890
      ProxyTimeout 300
      ProxyHTMLURLMap /virtuoso/ http://172.16.12.128:8890/
      ProxyHTMLURLMap /virtuoso http://172.16.12.128:8890
      ProxyPreserveHost On
</VirtualHost>

But doing so, when trying to enter login and password for virtuoso
login, from http://www.mysite.net/virtuoso/conductor (with expected screen).
I have an error with a returned address
http://www.plm-interop.net/conductor/main_tabs.vspx, and a message "Not
found".

I think it does not work, because some call are may be not done under
the path /virtuoso , in particular with the login, but I'm not so sure.

Did some one already address successfully this need (redirection on a
server) and can indicate me how to proceed?

I think your ProxyHTMLURLMap arguments are in reverse order.


The following should work:

NameVirtualHost 88.191.91.72

<VirtualHost 88.191.91.72>
ServerName www.mysite.net <http://www.mysite.net>
...

    #  Disable global proxy
    ProxyRequests       Off

    #  Pass original host to Virtuoso
    ProxyPreserveHost   On

    #  Timeout waiting for Virtuoso
    ProxyTimeout        300

    #  Set permission
    <Proxy *>
        Order deny,allow
        Allow from all
    </Proxy>

    #
    #  Map /virtuoso/ to a local Virtuoso instance.
    #
    #  Since ProxyPass and ProxyPassReverse only fix the Headers
    #  of the request, we need to use ProxyHTMLURLMap to rewrite
    #  content.
    #
    <Location /virtuoso/>
        ProxyPass               http://172.16.12.128:8890/
        ProxyPassReverse        /

        #  Enable rewrite rules
        ProxyHTMLEnable         On
        ProxyHTMLURLMap         / /virtuoso/
        ProxyHTMLURLMap         http://172.16.12.128:8890/ /virtuoso/

        # Uncomment this when EnabledGzipContent=1 in virtuoso.ini
        #SetOutputFilter         INFLATE;DEFLATE
    </Location>
</VirtualHost>


If we map the virtual host straight through to Virtuoso, we only need header rewriting and save the time/cpu power to rewrite the content.

    #
    #  Map / to a local Virtuoso instance
    #
    #  Since paths are mapped straight through, we do not have to
    #  rewrite the content.
    #
    <Location />
        ProxyPass               http://172.16.12.128:8890/
        ProxyPassReverse        /
    </Location>

Note that the next version of Virtuoso OpenSource has a couple of patches to fix some issues with running under a reverse proxy, so you may need a newer version of Virtuoso.

Please contact me if you continue to experience problems and i will make a new snapshot available to you.

Patrick

Reply via email to