NGINX wrapper for Omnis CGI
Hi Nick,
I have no experience with NGINX, but I dont think the location name should refer to an existing file, because it will
cause a conflict. It should instead be a unique handler, as in
location /myomnisuniqueurl {
etc…
regards
Bruno
By Design
www.bydesign.fr
Bruno Del Sol
bruno.delsol@bydesign.fr
tel (33) 01 48 78 47 37
46, rue de La Tour d’Auvergne
75009 Paris (France)
Le 19/03/2018 à 16:57, Nick Renders a écrit :
> Hi,
>
> Thanks for the feedback, guys.
>
> I tried setting up a reverse proxy in my NGINX config that refers to the Omnis runtime, but I couldn’t get it working
> properly.
> The request actually goes through to Omnis, but for some reason it is handled by the Omnis Web Service.
> Our Omnis runtime runs on a different machine, but I don’t think this is the reason why it is not working.
>
>
> My NGINX config looks like this (I have tried uncommenting the “proxy_set_header” lines, but that makes no difference) :
>
> location /cgi-bin/nph-omniscgi {
> proxy_pass 10.0.0.1:5912;
> # proxy_set_header Host $http_host;
> # proxy_set_header X-Forwarded-Host $http_host;
> # proxy_set_header X-Real-IP $remote_addr;
> # proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
> }
>
>
>
> And in the Omnis runtime, each request is logged in the “Web Service Server Log” as follow:
>
> Request XML =
>
> Response XML =
>
>
>
>
>
>
>
> '/cgi-bin/nph-omniscgi' (reported from Omnis server)
>
>
>
>
>
>
>
> Any idea what is wrong here? Is it normal that the Omnis WS server is handling this?
>
>
> Thanks,
>
> Nick
>
>
>
> On 17 Mar 2018, at 9:26, Bruno Del Sol wrote:
>
>> Hi,
>>
>> It is not compulsory to have the cgi exe nor the apache module to talk to Omnis through a webserver, A simple proxy
>> is enough with Apache or any webserver (nginx, node, etc…)
>>
>>
>> #apache proxy syntax for regular Omnis on the same host listening to port 5981
>> # try me with myserver/omnis?OmnisLibrary=lib&OmnisClass=rtask
>>
>>
>>
>> ProxyPass 127.0.0.1:5981
>> ProxyPassReverse 127.0.0.1:5981
>>
>>
>>
>> #apache proxy syntax for restful Omnis on the same host listening to port 5981
>> # try me with myserver/omnisrest/lib/rtask/mymethod
>>
>>
>> ProxyPass 127.0.0.1:5981/api
>> ProxyPassReverse 127.0.0.1:5981/api
>>
>>
>> As the matter of fact, the Omnis cgi or module are empty shells that passes the http environment to Omnis. The only
>> thing that’s in there and not in Omnis, is some error messages that deal with “Omnis is not there” and stuff like
>> that, and are a little bit mode informative than the proxy ones (which will probably always return http 503 for every
>> problem.
>>
>> Regards
>> Bruno
>>
>>
>> By Design
>> www.bydesign.fr
>> Bruno Del Sol
>> bruno.delsol@bydesign.fr
>> tel (33) 01 48 78 47 37
>> 46, rue de La Tour d’Auvergne
>> 75009 Paris (France)
>>
>> Le 16/03/2018 à 21:14, Clifford Ilkay a écrit :
>>> On Fri, Mar 16, 2018 at 5:37 AM, Nick Renders <omnis1@arcict.com> wrote:
>>>
>>>> Hi List,
>>>>
>>>> We are migrating our Web Server from Apache to NGINX.
>>>>
>>>> I read up a bit on the list, and if I understand this correctly,
>>>> it is possible to write a FastCGI wrapper so that the Omnis GGI
>>>> can be called. Has anyone tried this option?
>>>
>>> It should be feasible. However, you might be better off using the Omnis
>>> Apache module and Apache with nginx proxying to Apache. It’s not an unusual
>>> configuration at all. Configure Apache to only listen to localhost:8080 (or
>>> whatever port you have available) and proxy any requests to nginx on port
>>> 80 or 443 to Apache localhost:8080. You could put whatever assets that
>>> Omnis doesn’t have to serve, like CSS, any static HTML pages, images, and
>>> JavaScript, from nginx and forward everything else to the Omnis handler on
>>> Apache.
>>>
>>> Regards,
>>>
>>> Clifford Ilkay
>>>
>>> +1 647-778-8696
>>> _____________________________________________________________
>>> Manage your list subscriptions at lists.omnis-dev.com
>>> Start a new message -> mailto:omnisdev-en@lists.omnis-dev.com
>>>
>>
>> _____________________________________________________________
>> Manage your list subscriptions at lists.omnis-dev.com
>> Start a new message -> mailto:omnisdev-en@lists.omnis-dev.com
> _____________________________________________________________
> Manage your list subscriptions at lists.omnis-dev.com
> Start a new message -> mailto:omnisdev-en@lists.omnis-dev.com
_____________________________________________________________
Manage your list subscriptions at lists.omnis-dev.com
Start a new message -> mailto:omnisdev-en@lists.omnis-dev.com