moinwiki / moin-1.9

MoinMoin Wiki (1.9, also: 1.5a ... 1.8), stable, for production wikis
https://moinmo.in/
Other
140 stars 53 forks source link

Difficulties running on non-root mounted URL #39

Closed vranki closed 5 years ago

vranki commented 5 years ago

I'm running moinmoin behind a apache reverse proxy at url /moinmoin/.

I've set these values to get most of the links working:

url_prefix_static = '/moinmoin' + url_prefix_static
url_prefix_local = '/moinmoin/'
url_mappings = { '/': '/moinmoin/' }

But at least login page doesn't respect these - login action is /LanguageSetup which is outside moinmoin.

ThomasWaldmann commented 5 years ago

I didn't check the settings you posted above, but the first thing you need to check is that the WSGI env vars are set correctly, especially SCRIPT_NAME (pointing to where your moin app is mounted into your url path) and PATH_INFO.

If these are not correct, it won't work. See the wsgi / cgi spec for more details.

vranki commented 5 years ago

I'm not using WSGI but Apache as reverse proxy:

ProxyPass "/moinmoin/" "http://moinmoin:8080/"
ProxyPassReverse "/moinmoin/" "http://moinmoin:8080/"

I suppose I'll need to set up WSGI next, if this is not a supported way to do this.

vranki commented 5 years ago

Should it be possible to run moinmoin without wsgi in a non-root URL?

If yes, how to do it? If no, what are the url_prefix_static and url_prefix_local variables used for?

ThomasWaldmann commented 5 years ago

wsgi today is the standard when using python web apps. cgi and other methods are old / outdated (and esp. cgi is also very slow).

the fundamental problem to get the web server / wsgi software set up correctly (esp. SCRIPT_NAME and PATH_INFO) is basically the same. if you can't manage that, run it at the root URL.

ThomasWaldmann commented 5 years ago

no reply, guess it's solved.