minad / olelo

Wiki with git backend
MIT License
241 stars 44 forks source link

Location based reverse proxy and https issue #82

Closed EarthFury closed 11 years ago

EarthFury commented 11 years ago

My setup is as such:

<VirtualHost *:80>
        ServerName myurl.net

        Redirect permanent / https://myurl.net/
</VirtualHost>
<VirtualHost *:443>
    # Server name, directory, etc

    <Location /wiki>
        ProxyPass http://127.0.0.1:8081
    </Location>
</VirtualHost>

(I've also tried:)

<VirtualHost *:443>
    # Server name, directory, etc

    ProxyPass /wiki http://127.0.0.1:8081
</VirtualHost>
base_path:       '/wiki'

Misc information:

    <base href="http://myurl.net/wik/"/>

(As an aside, it seems Google Chrome doesn't like rendering with the CSS when it's redirected from http to https like it's being. Firefox does render fine, though.)

So, my issue is.... Unless I've missconfigured something horribly, or missed an option somewhere, Olelo seems to have some serious URL issues... So what can I do to get this working?

minad commented 11 years ago

I have running my private wiki under /wiki as you do, also with https and proxy, so it works. I will take a look.

minad commented 11 years ago

You need "base_path: '/wiki'" and:

ProxyPass /wiki http://localhost:5000
ProxyPassReverse /wiki http://localhost:5000
ProxyPreserveHost On
ProxyRequests Off
RequestHeader set X-Forwarded-Proto https
    <Proxy *>
    Order deny,allow
    Allow from all
    </Proxy>

I think the forwarded proto is the problem. Does it work now?

minad commented 11 years ago

I added a section to the README.creole

EarthFury commented 11 years ago

Thank you very much for the prompt reply. :) Really, thank you.

That fixed most things. However, the entries under the "View" menu still point to the server root (Such as: https://myurl.net/?aspect=pageinfo)

Note: I'm using RubyGems on Funtoo (Gentoo), the gem version for Olelo is 0.9.10


Edit: The HTML output for one of the links is: <a href="/?aspect=page">

minad commented 11 years ago

This could be a caching issue. Please delete the cache and check again. I am glad that it works :)

EarthFury commented 11 years ago

That was it. You're awesome :) (and this time I'm not accidentally clicking "Close & Comment" instead of "Comment" xD)

minad commented 11 years ago

:D Thank you and have fun!