Monitor de Apache Webserver op je Synology DSM

DSM 5:

Login as root via a terminal session on your Synology NAS.

vi /etc/httpd/conf/httpd.conf-user

add the following lines and fill allow from:

--

#Apache server status
<Location /server-status>
SetHandler server-status
Order deny,allow
Deny from all
Allow from <fill in the ip address of your server running your Anturis agent>
</Location>

#Apache server status
#To obtain a full report with current status information
ExtendedStatus On

--

Restart httpd-user daemon:

synoservicectl --restart httpd-user

Within Anturis fill in the monitoring settings:

Apache server connection:

Apache statistics web-page URL (requires mod_status): <servername/server-status>

You can now monitor your Apache webserver running on your Synology NAS.

DSM 6:

Login as admin via a terminal session on your Synology NAS.

sudo -i

create file for example status.conf under /usr/local/etc/httpd/sites-enabled/

--

#Apache server status
<Location /server-status>
SetHandler server-status
Order deny,allow
Deny from all
Allow from <fill in the ip address of your server running your Anturis agent>
</Location>

#Apache server status
#To obtain a full report with current status information
ExtendedStatus On

--

Reload Apache server:

reload pkg-apache22

Synology DSM 6 (terminal) service control

Webuserinterface, Synology recommended:

Control Panel, Task Scheduler, Create Scheduled Task, Stop/Start Service 

Terminal command:

ssh admin@server

sudo -i

synoservicecfg --list

synoservicecfg --hard-stop <service>

synoservicecfg -stop <service>

synoservicecfg --hard-start <service>

synoservicecfg -start <service>

synoservice –status

synoservice –restart <service>

synoservicectl –restart <service>

Apache webserver:

stop pkg-apache22

start pkg-apache22

reload pkg-apache22


restart DSM Webapplication:

restart synoscgi


 

htop and top to see your running processes.