server down

AudiTT

Member
Hi, i am running my websites on centminmod and right now my websites are all down

when i try to restart (ngxrestart):
Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" for details.

and when i "systemctl status nginx.service" i get this
Starting nginx: nginx: [emerg] unknown directive "more_set_headers" in /usr/local/nginx/conf/nginx.conf:41


how can i fix this?
 
That error tends to suggest that the headers more module is not being loaded, check your conf file to see if the module is being loaded, if it is then also check the gx_http_headers_more_filter_module.so is present.
 
Be sure that you are using the latest CentMin mod code (run centmin from your CLI) and then update your code base (option 23, option 2) then make sure that nginx is at least at version 1.13.9 by running option 4.
Once you have done that then try the restart of the nginx services.
 
Be sure that you are using the latest CentMin mod code (run centmin from your CLI) and then update your code base (option 23, option 2) then make sure that nginx is at least at version 1.13.9 by running option 4.
Once you have done that then try the restart of the nginx services.
it was a deep problem,
mysql crashed because the vps went out of space.
 
it was a deep problem,
mysql crashed because the vps went out of space.
Bash:
#!/bin/sh
# set -x
# Shell script to monitor or watch the disk space
# It will send an email to $ADMIN, if the (free available) percentage of space is >= 90%.
# -------------------------------------------------------------------------
# Set admin email so that you can get email.
ADMIN="root"
# set alert level 90% is default
ALERT=90
# Exclude list of unwanted monitoring, if several partions then use "|" to separate the partitions.
# An example: EXCLUDE_LIST="/dev/hdd1|/dev/hdc5"

#
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
#
function main_prog() {
while read output;
do
#echo $output
  usep=$(echo $output | awk '{ print $1}' | cut -d'%' -f1)
  partition=$(echo $output | awk '{print $2}')
  if [ $usep -ge $ALERT ] ; then
     echo "Running out of space \"$partition ($usep%)\" on server $(hostname), $(date)" | \
     mail -s "Alert: Almost out of disk space $usep%" $ADMIN
  fi
done
}

if [ "$EXCLUDE_LIST" != "" ] ; then
  df -H | grep -vE "^Filesystem|tmpfs|cdrom|${EXCLUDE_LIST}" | awk '{print $5 " " $6}' | main_prog
else
  df -H | grep -vE "^Filesystem|tmpfs|cdrom" | awk '{print $5 " " $6}' | main_prog
fi

This is not my code, but something I found on the 'net. It will send an email to root when the VPS/server file system is 90% full. You can use an alias to have the root email sent to an actual email account that you have.
You simply set up a CRON job to run it regularly.
 
Last edited:
Top Bottom