deploying my_service to apache2

117 views
Skip to first unread message

oldMammuth

unread,
Jan 7, 2017, 9:48:59 AM1/7/17
to ngrest
I have a service called my_service in ~/ngrest-projects/my_service
I have build it with the ngrest script and the server in localhost:9098 is working fine, so I wanted to deploy it unto an apache2 server. For this purpose I created a vagrant box with a debian/contrib-jessie on it. There I have put a building environment, including apache and mysql (I have set up a service using loentar/ngrest-db too). I tried there to build a localhost:9098 server too, and it's working fine. But when I deploy to apache2 following the instructions in https://github.com/loentar/ngrest/wiki/Deploy-ngrest-under-Apache2-Web-Server I only get a generic server, and no service on it. I tried with fresh installs, etc... but I do not get how to load my services to the apache ngrest_module. Any indications where should I look to resolve this?
Thanks.
Davide 'oldMammuth'

Dmitry Utkin

unread,
Jan 8, 2017, 6:46:22 AM1/8/17
to ngrest
Hi,

have you placed all your services to ServicesPath which is set by this line?

  ServicesPath /home/user/.ngrest/ngrest-build/deploy/share/ngrest/services


суббота, 7 января 2017 г., 17:48:59 UTC+3 пользователь oldMammuth написал:

oldMammuth

unread,
Jan 8, 2017, 9:50:19 AM1/8/17
to ngrest
Yeah man, that was exactly  what I was missing.
I just went to my project's directory:
$ cd ~/ngrest-projects/my_service/.ngrest/local/build/services
then I copied:
$ cp *.so /home/vagrant/.ngrest/ngrest-build/deploy/share/ngrest/services (I was inside a vagrant box to test in a mint environment)
restarted apache and I was on the sweet go!

Thanks a lot, and sorry I didn't understand it was necessary to fetch the *.so from the local project and put it into the path marked by Servicespath inside the ngrest apache's .conf file; in fact I knew I was missing something, I even tried to copy everything under /opt/ngrest as it seemed the key in nginx deploying, but it obviously didn't work.

Thank you a lot for your great job on ngrest and ngrest-db!

Niks Arora

unread,
Sep 26, 2018, 7:18:30 AM9/26/18
to ngrest
I have compiled and installed ngrest on my linux box , But when I deploy to apache2 following the instructions in https://github.com/loentar/ngrest/wiki/Deploy-ngrest-under-Apache2-Web-Server , I am not able to find mod_ngrest.so , Can anyone help me with this , i need to deploy ngrest under apache2 server very badly .

Thanks.
Niks  

Dmitry Utkin

unread,
Sep 26, 2018, 8:18:29 AM9/26/18
to ngrest
Please provide full on how you trying to compile and install that module starting from this point:



среда, 26 сентября 2018 г., 14:18:30 UTC+3 пользователь Niks Arora написал:

Niks Arora

unread,
Sep 26, 2018, 11:48:34 AM9/26/18
to ngrest
i have installed the ngrest server using this 


and successfully my ngrest server is running at localhost:9080

when i am running this command i am facinng "No such file or directory" error
ls ~/.ngrest/ngrest-build/deploy/share/ngrest/modules/apache2/mod_ngrest.so
more digging in the directory structure i found under

~/.ngrest/ngrest-build/deploy/share/ngrest folder , 
1. There are only codegen and services folder available , no modules folder is present 
2. Any other way to build this mod_ngrest.so ??

Please help 

Thanks
Niks



Dmitry Utkin

unread,
Sep 26, 2018, 3:13:13 PM9/26/18
to ngrest
Is libapr1-dev and apache2-dev installed as mentioned?


what do you see in console output when you start this?

touch ~/.ngrest/ngrest/CMakeLists.txt; make -C ~/.ngrest/ngrest-build
ls ~/.ngrest/ngrest-build/deploy/share/ngrest/modules/apache2/mod_ngrest.so



среда, 26 сентября 2018 г., 18:48:34 UTC+3 пользователь Niks Arora написал:

Niks Arora

unread,
Sep 27, 2018, 2:30:38 AM9/27/18
to ngrest
Yes libapr1-devel and apache-dev are installed 

1. Package apr-devel-1.3.9-5.el6_9.1.x86_64 already installed and latest version
2. Package httpd-devel-2.2.15-60.el6_9.6.x86_64 already installed and latest version

I have attached error i am facing when i am trying to execute the command

touch ~/.ngrest/ngrest/CMakeLists.txt; make -C ~/.ngrest/ngrest-build
ls ~/.ngrest/ngrest-build/deploy/share/ngrest/modules/apache2/mod_ngrest.so


error1.png

Dmitry Utkin

unread,
Sep 27, 2018, 7:24:12 AM9/27/18
to ngrest
Guess you have too new (currently unsupported) version of Apache2.

I will try to fix it, but it can take some time

четверг, 27 сентября 2018 г., 9:30:38 UTC+3 пользователь Niks Arora написал:

Dmitry Utkin

unread,
Sep 27, 2018, 9:01:15 AM9/27/18
to ngrest
Which version of Linux do you use?

I managed to deploy ngrest under Apache2 on fresh installation of Ubuntu 18.04 just by copy-paste the manual commands.

четверг, 27 сентября 2018 г., 9:30:38 UTC+3 пользователь Niks Arora написал:
Reply all
Reply to author
Forward
0 new messages