loris-imageserver / loris

Loris IIIF Image Server
Other
208 stars 87 forks source link

WSGI setup incorrect for Ubuntu 16.04 #284

Open captmiddy opened 7 years ago

captmiddy commented 7 years ago

The instructions found here: https://github.com/loris-imageserver/loris/blob/development/doc/apache.md

Have a slight flaw in them for Ubuntu 16.04 where they will continually error out saying it can't reach a specified folder. You must pass the home parameter to the WSGI configuration: WSGIDaemonProcess loris2 home=/var/www/loris2 user=loris group=loris processes=10 threads=15 maximum-requests=10000

The home can be something other than /var/www/loris2 but if it isn't set, it will error out stating it can't change into non-existent folder /var/www/loris. At any rate it appears that this parameter is best set going forward with newer versions of mod_wsgi.

I did not submit a pull request because I am not sure the impact of setting this parameter on 14.04 or 12.04 would be, so wasn't sure if it should be called out as a special issue for 16.04 or just correct the parameter line for everyone and most systems wouldn't require it.

jpstroop commented 7 years ago

@captmiddy, thanks for pointing this out! It actually is covered here:

$ adduser loris

This user needs to have a home directory (unless you want to override it in the WSGI home= directive)

But you're correct, it might be a good idea to restate this in the Apache instructions. I'd happily merge a PR.

captmiddy commented 7 years ago

AH HA! see this is what happens when you copy other people's code :D. The issue is actually that I used the Loris Docker image as a starting point for the Apache setup we are doing and the ID used in the Loris Docker Image set the home directory to /var/www/loris but pushed the files into /var/www/loris2. I should have set the home directory to /var/www/loris2 to match the installation directory used for the file. I am going to adjust this and see if this works properly. If this works I may submit a pull request against the docker setup to help others from hitting the same stumbling block.

That said it may be a good idea to add a hint on the Apache configuration page so I will write up something and submit a pull request for that as well. Thanks for pointing out what I obviously missed in my setup.

jpstroop commented 7 years ago

No worries, anything for the sake of clarity!