loentar / ngrest

Fast and easy C++ RESTful WebServices framework
Apache License 2.0
465 stars 94 forks source link

Apache webserver not coming up with ngrest module #85

Closed raadiy closed 2 years ago

raadiy commented 2 years ago

Hi Dmitry,

This question is more to do with Apache setup using ngrest. Apache webserver on RHEL 8.4 is not able to load some of the ngrest libraries. Could you please suggest if you have any comments.

On RHEL 8.4, I am trying to bring up Apache webserver with ngrest module, but it fails with the following error:


httpd[5277]: httpd: Syntax error on line 59 of /etc/httpd/conf/httpd.conf: Syntax error on line 4 of /etc/httpd/conf.modules.d/ngrest.conf: Cannot load /etc/httpd/modules/mod_ngrest.so into server: libngrestcgparser.so: cannot open shared object file: No such file or directory

----Here are the contents of /etc/httpd/conf.modules.d/ngrest.conf---- SetEnv NGREST_LOG_FILE /tmp/ngrest.log SetEnv NGREST_LOG_LEVEL TRACE

LoadModule ngrest_module /etc/httpd/modules/mod_ngrest.so

# path to deploy ngrest services from ServicesPath /test1 # filters path is optional. comment this line if you do not use filters FiltersPath /test1 # location regex on which ngrest is bound. # this will bind /testsrv SetHandler ngrest

I have copied the shared library libngrestcgparser.so, along with few other libraries in a path, set the path in LD_LIBRARY_PATH. But no luck

Any suggestions will be helpful.

Thanks Raajesh

raadiy commented 2 years ago

Hi Dmitry, I was able to figure it out, it was due to some SELinux security context that had to be changed using "chcon". Regards Raajesh