Prerequisites
Configuration in Nginx
1. Stop the Nginx server.
2. Go to the path <Nginx_Installed_Directory>/conf and edit the nginx.conf file. [In Linux the default path is (/etc/nginx).]
3. Comment out the existing log format and replace it with the following log_format.
log_format main '$remote_addr - $remote_user $time_iso8601 [$request_time] "$request" '
'$status $body_bytes_sent || "$request_body" || "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
4. Uncomment the access_log line if it is already commented.
5. Add the following lines into the server module.
location /nginx-status {
stub_status on;
allow 127.0.0.1;
}
6: Start the Nginx server.
Adding Nginx to Applicare
1. Once the agent is started, it will automatically register with the Applicare controller. Log in to the Applicare console and go to the Overview menu.
2. Locate the newly added agent, select it, and click the Edit button.
3. Enable the "Add Nginx Configuration" checkbox and add the below values.
1. Log file path
2. Nginx Host
3. Nginx Port
4. Nginx Protocol
- Click the update button to save.
4a. For Windows
4b. For Linux
Comments
0 comments
Please sign in to leave a comment.