Hey guys,
I had a problem with getting longview to work with VestaCP since VestaCP does the apache/nginx configuration for you.
The configuration files offered by the help section for Apache and Nginx don't work with the VestaCP stock configuration.
So here's how to get everything to play nice.
The problem stems from longview trying to access apache and nginx on port 80, we just change the port longview is attaching to and it works great.
Keep in mind I'm doing this on Debian 7.5, the specific file locations and other things may be different for other distros, especially for CentOS
Step 1: Edit Apache ConfigurationOpen status.conf, VestaCP won't overwrite this file.
Code:
sudo nano /etc/apache2/mods-enabled/status.conf
Write this to the file
Code:
<IfModule mod_status.c>
ExtendedStatus On
Listen 127.0.0.1:8081
<Location /server-status>
SetHandler server-status
Order deny,allow
Deny from all
Allow from 127.0.0.1
</Location>
</IfModule>
Ctrl+O, Enter, then Ctrl+X to save and close.
Step 2: Edit Nginx configurationOpen a new file, longview.conf:
Code:
sudo nano /etc//nginx/conf.d/longview.conf
Write this to it:
Code:
server {
listen 127.0.0.1:79;
server_name 127.0.0.1;
location /nginx_status {
stub_status on;
allow 127.0.0.1;
deny all;
}
}
Save and close.
Step 3: Edit Longview ConfigurationOpen Apache configuration
Quote:
sudo nano /etc/linode/longview.d/Apache.conf
Write this to the file:
Quote:
Comment out or delete any other lines in this file.
Save and close.
Now open the Nginx Configuration
Quote:
sudo nano /etc/linode/longview.d/.conf
Write this to the file
Code:
location http://127.0.0.1:79/nginx_status
Save and close.
Step 4: Restart ServicesCode:
sudo service apache2 restart
sudo service nginx restart
sudo service longview restart
Hope that saves someone a little time!