how to make ServerPilot control panel work with Longview?
https://serverpilot.io/
2 Replies
manually
I've written a blog post on this -
Create /etc/apache-sp/conf.d/status.conf with the following contents:
<ifmodule mod_status.c="">ExtendedStatus On
<location server-status=""><ifmodule mod_rewrite.c="">RewriteEngine Off</ifmodule>
SetHandler server-status
Require ip 127.0.0.1</location></ifmodule>
Do a configtest and if successful restart Apache:
sudo /opt/sp/apache/bin/apachectl -t
sudo service apache-sp restart
For Nginx create /etc/nginx-sp/conf.d/status.conf with the following contents:
server {
listen 127.0.0.1:80;
server_name 127.0.0.1;
location /nginx_status {
stub_status on;
allow 127.0.0.1;
deny all;
}
}
Do a configtest and if successful reload Nginx:
sudo service nginx configtest
sudo service nginx reload
Finally add the status URLs of Apache and Nginx to Longview's config file:
sudo bash -c 'echo "location http://127.0.0.1:81/server-status?auto" > /etc/linode/longview.d/Apache.conf'
sudo bash -c 'echo "location http://127.0.0.1/nginx_status" > /etc/linode/longview.d/Nginx.conf'
Restart Longview:
sudo service longview restart