nginx_webaget install issue
December 17, 2016 09:46AM
1. I have before install Apache webserver + apache Webagent to product a website. using this [document](https://backstage.forgerock.com/docs/openam/13/getting-started), its working fine.

**Apache Web_agent Setup:**

While Installing apache Webagent its asking couple of Configurations:

Apache httpd Conf: /path/to/httpd.conf
openam Server Url : http://openam.test.mobi:8080/openam
agent url : http://apache.test.mobi:80
webagent name: xxxxx
Enter the Realm/Organization: /
password File : /tmp/pwd.txt

After installing apache_webagent add redirect configuration to apache **httpd.conf** and agent Configuration.

LoadModule amagent_module /opt/web_agents/apache24_agent/bin/../lib/mod_openam.so
AmAgent On
AmAgentConf /opt/web_agents/apache24_agent/bin/../instances/agent_1/config/agent.conf

After that, try to load **Agent Url** its **Redirect to OpenAm**, **Aftet Authenticate only show our Site.**

But, My web application run nginx Server, so try to follow your [Document](https://github.com/hamano/nginx-mod-am) to install nginx agent.

**Nginx Web_agent Setup:** (**what I did**)

install nginx webserver in ubuntu16.04 and setup webapplication, now run webapplication fine,

**nginx web_server conf file:** /etc/nginx/conf/nginx.conf

Next, Try to install Ngnix_ web agent.

1. extract the **nginx_agent_20160226.deb.x86_64.zip** and copy to **/opt**
2. Execute agentadmin.sh ./bin/agentadmin.sh

it,s asking couple of question:

OpenSSO Server Url : http://openam.test.mobi:8080/openam
Agernt Profile Name : agentname
Agent password : agent_password

Then, I run nginx

# ./bin/nginx

its throw, error

nginx: [alert] could not open error log file: open() ".//logs/error.log" failed (2: No such file or directory)
2016/12/17 10:04:49 [emerg] 13615#0: open() ".//conf/nginx.conf" failed (2: No such file or directory)

**Build way Install Nginx_agent:**

i try to install nginx _agent using build instuction way,

I download your git-hub code and extract it,

Then make to install:

$ make

while make install throw below error:

make[2]: Entering directory '/opt/nginx-mod-am-master/build'
cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -g -I../extlib/common/include/ -DLINUX -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
-o objs/addon/../ngx_http_am_module.o \
..//ngx_http_am_module.c
..//ngx_http_am_module.c: In function 'ngx_http_am_init_process':
..//ngx_http_am_module.c:798:5: error: implicit declaration of function 'am_agent_version' [-Werror=implicit-function-declaration]
am_agent_version(agent_version);
^
..//ngx_http_am_module.c:804:18: error: too many arguments to function 'am_web_init'
status = am_web_init((char *)conf->boot_file.data,
^
In file included from ..//ngx_http_am_module.c:36:0:
src/http/am_web.h:441:27: note: declared here
AM_WEB_EXPORT am_status_t am_web_init(const char *config_file);
^
..//ngx_http_am_module.c:807:18: error: too many arguments to function 'am_web_init'
status = am_web_init((char *)conf->boot_file.data,
^
In file included from ..//ngx_http_am_module.c:36:0:
src/http/am_web.h:441:27: note: declared here
AM_WEB_EXPORT am_status_t am_web_init(const char *config_file);
^
..//ngx_http_am_module.c:818:14: error: implicit declaration of function 'am_agent_init' [-Werror=implicit-function-declaration]
status = am_agent_init(&agent_initialized);
^
..//ngx_http_am_module.c:826:20: error: implicit declaration of function 'am_web_get_agent_configuration' [-Werror=implicit-function-declaration]
agent_config = am_web_get_agent_configuration();
^
..//ngx_http_am_module.c:826:18: error: assignment makes pointer from integer without a cast [-Werror=int-conversion]
agent_config = am_web_get_agent_configuration();
^
..//ngx_http_am_module.c: In function 'ngx_http_am_notification_handler':
..//ngx_http_am_module.c:867:5: error: too many arguments to function 'am_web_handle_notification'
am_web_handle_notification(body, strlen(body), agent_config);
^
In file included from ..//ngx_http_am_module.c:36:0:
src/http/am_web.h:537:20: note: declared here
AM_WEB_EXPORT void am_web_handle_notification(const char *data,
^
..//ngx_http_am_module.c:868:5: error: implicit declaration of function 'am_web_delete_agent_configuration' [-Werror=implicit-function-declaration]
am_web_delete_agent_configuration(agent_config);
^
..//ngx_http_am_module.c: In function 'ngx_http_am_handler':
..//ngx_http_am_module.c:928:22: error: assignment makes pointer from integer without a cast [-Werror=int-conversion]
agent_config = am_web_get_agent_configuration();
^
..//ngx_http_am_module.c:945:8: error: too many arguments to function 'am_web_is_notification'
if(am_web_is_notification(req_params.url, agent_config) == B_TRUE){
^
In file included from ..//ngx_http_am_module.c:36:0:
src/http/am_web.h:511:25: note: declared here
AM_WEB_EXPORT boolean_t am_web_is_notification(const char *request_url);
^
..//ngx_http_am_module.c:959:14: error: too many arguments to function 'am_web_process_request'
result = am_web_process_request(
^
In file included from ..//ngx_http_am_module.c:36:0:





my question is:

Why? This Error Occur and explain me Following questions:

1. where to configure **AgentUrl** in **nginx_agent like apache_agent**?
2. my nginx webserver(web application) use **/etc/nginx/conf/nginx.conf**, But, nginx_agent have one nginx.conf file, which one i need to use?
3. nginx_agent two Years old, this can Support openam 13.0?.

Reference: https://github.com/hamano/nginx-mod-am/issues/12
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 310
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready