proycon / clam

Quickly turn command-line applications into RESTful webservices with a web-application front-end. You provide a specification of your command line application, its input, output and parameters, and CLAM wraps around your application to form a fully fledged RESTful webservice.
https://proycon.github.io/clam
GNU General Public License v3.0
129 stars 17 forks source link

Clam treats server subdirectory as project directory? #68

Closed peterdekker closed 6 years ago

peterdekker commented 6 years ago

I am using clam inside the LaMachine distribution, for the PICCL pipeline. I configured the server URL as https://my.server.com/piccl. However, when I open this URL, I get the error: Project piccl was not found for user my.user@university.edu

Apparently, the subdirectory of the server, where the PICCL pipeline is hosted, is seen as a project directory. Since I cannot find other server settings that changed, I think this could be caused by recent changes in clam. In a previous LaMachine install, I had clam version 2.3, which worked well. In a new LaMachine install, with clam version 2.3.2, the problem occurs.

proycon commented 6 years ago

I indeed made some changes recently for more flexible URLs. I'll have to look into this, possibly a regression bug.

This is using your setup with Apache rather than the default nginx in LaMachine I assume, right? and URLPREFIX is properly set to piccl in the service configuration file?

proycon commented 6 years ago

Hmm.. it doesn't reproduce on our own production environment (Apache + mod_uwsgi_proxy).

What are you guys using? mod_uwsgi_proxy or mod_wsgi?

proycon commented 6 years ago

I just released v2.3.3 with an added INTERNALURLPREFIX parameter (you can set this in your service configuration file; python or yaml). It should only be used in situations where this bug occurs (I still can't reproduce it). The value should be equal to the value for URLPREFIX. I hope this solves this issue.

proycon commented 6 years ago

(please reopen if problem persists with new clam)

peterdekker commented 6 years ago

Thanks for looking into this and for your fix! Eventually, it looks like the error was not directly related to clam, but to our Apache piccl configuration. Previously, the following line worked: WSGIScriptAlias /piccl {{wsgi_dir}}/picclservice.wsgi/piccl Probably some code in LaMachine changed, now we had to change this line to: WSGIScriptAlias /piccl {{wsgi_dir}}/picclservice.wsgi With this configuration, everything works.