Auto Shutdown and Restart Apache HTTPD Service Daemon at Preset Time Auto cierre y reinicie el servicio de Apache httpd demonio en tiempo preestablecido
The core component of any websites, blogs, web services and web applications is the web server. El componente básico de cualquier sitio web, blogs, servicios web y aplicaciones web es el servidor web. And Apache is the most popular HTTP server that powers the websites worldwide. Y Apache es el más popular servidor HTTP poderes que los sitios web en todo el mundo. It’s important to ensure that the uptime and continuous running of Apache service or daemon on the server, as if HTTPD service is down, your website will be unaccessible to the visitors. Es importante asegurarse de que el tiempo de actividad y funcionamiento continuo de Apache servicio o demonio en el servidor, como si el servicio httpd no responde, su sitio web se unaccessible a los visitantes. Other than using monitoring service, script or utility to check if the HTTPD daemon is up, server administrator also has a choice to restart the Apache service periodically. Aparte de utilizar el servicio de vigilancia, el guión y la utilidad para comprobar si el demonio httpd es, el administrador del servidor también tiene una opción para reiniciar el servicio Apache periódicamente.
Shutdown and restart Apache periodically at specific interval helps to ensure that Apache web service is always running in top notch condition, without effect of possible memory leak and resource hogging by persistent connections. Apague y reinicie Apache periódicamente a intervalos específicos de ayuda a asegurar que el servicio web Apache se ejecuta en condiciones de primera clase, sin efecto de la posible pérdida de memoria y recursos hogging de conexiones persistentes. It also ensure that the web sites downtime is limited to the next restart schedule, just in case it’s so unlucky that Apache hangs indefinitely and your monitoring service can’t pick up the incident. También velarán por que los sitios en la Web el tiempo de inactividad se limita a reiniciar el próximo calendario, en caso de que tan mala suerte que Apache se bloquea indefinidamente y su servicio de monitoreo no pueden recoger el incidente.
To shutdown and start Apache automatically, we can make use of crontab (or Scheduled Task or Task Scheduler in Windows Server) to schedule the task at the time prefer. Para cerrar e iniciar automáticamente Apache, podemos hacer uso de crontab (o tarea programada o Programador de tareas en Windows Server) para programar la tarea en el momento prefiere. Simply edit the cron jobs with a root or whell user, and add in the following line: Basta con editar el cron puestos de trabajo con una raíz o whell usuario, y en añadir la siguiente línea:
mhdmw /usr/local/apache/bin/apachectl restart mhdmw / usr / local / apache / bin / apachectl restart
Replace m, h, d, m and w with value of your preference, where they represent the following meaning: Reemplazar m, h, d, w m y con el valor de su preferencia, donde representan el siguiente significado:
m: min (0 - 59) m: min (0 - 59)
h: hour (0 - 23) h: hora (0 - 23)
d: day of month (1 - 31) d: día del mes (1 - 31)
m: month (1 - 12) m: mes (1 - 12)
w: day of week (0 - 6) (Sunday=0) w: día de la semana (0 - 6) (domingo = 0)
For variables that you want to happen every time, set it as * (asterisk). Para las variables que desea que esto ocurra cada vez, ponerlo como * (asterisco).
For example, to kill the Apache daemon and start it immediately at 1 AM every night, set the crontab line to: Por ejemplo, para matar al demonio Apache y empezar inmediatamente a 1 AM todas las noches, establezca la línea de crontab:
0 1 * * * /usr/local/apache/bin/apachectl restart 0 1 * * * / usr / local / apache / bin / apachectl restart
To restart Apache HTTPD service on weekend, such as Sunday 12 noon, use the following cron job: Para reiniciar Apache httpd servicio en fin de semana, como el Domingo 12 del mediodía, utiliza el siguiente tarea cron:
0 12 * * 0 /usr/local/apache/bin/apachectl restart 0 12 * * 0 / usr / local / apache / bin / apachectl restart
You can input “man crontab” to learn more about cron jobs in Linux/Unix/FreeBSD/CentOS. Puede introducir "man cron" para obtener más información sobre cron puestos de trabajo en Linux / Unix / FreeBSD / CentOS. To edit the crontab job list, simply enter “crontab -e” on the shell. Para editar el crontab lista de tareas, simplemente escriba "crontab-e" en el shell. Existing crontab will appear on a text editor, such as GNU nano. Existentes crontab aparecerá en un editor de texto, como GNU nano. If this is the case, make the necessary changes, then press “Ctrl-X”, follow by “Y” to save the file, and follow by Enter press to accept the default file name. Si este es el caso, hacer los cambios necesarios, a continuación, pulse Ctrl-X ", le siguió la" Y "para guardar el archivo, y siga por la prensa Ingresar a aceptar el nombre de archivo por defecto. The new crontab will be installed and in effect immediately. El nuevo crontab se instalará y en efecto de inmediato.
Note that the path to apachectl may be different on different variant of Unix, Linux or BSD flavors. Tenga en cuenta que el camino a apachectl puede ser diferente en diferentes variantes de Unix, Linux o BSD sabores. Use one of the following command to find out where is Apache installed: Utilice uno de los siguientes comando para saber dónde está instalado Apache:
find / apachectl | grep apachectl find / apachectl | grep apachectl
whereis apachectl whereis apachectl
Some Apache may install in /usr/sbin/apachectl, or you can use the httpd or apachectl symbolic links in /etc/rc.d/init.d/apachectl or /etc/rc.d/init.d/httpd. Algunos Apache puede instalar en / usr / sbin / apachectl, o puede utilizar el httpd apachectl o enlaces simbólicos en / etc / rc.d / init.d / apachectl o / etc / rc.d / init.d / httpd.
IMPORTANT : This is a machine translated page which is provided "as is" without warranty. IMPORTANTE: Se trata de una máquina que traduzca la página se proporciona "tal cual" sin garantía. Machine translation may be difficult to understand. La traducción automática puede resultar difícil de entender. Please refer to Por favor, consulte original English article artículo original Inglés whenever possible. siempre que sea posible.
Share and contribute or get technical support and help at Compartir y contribuir o recibir apoyo técnico y ayudar a My Digital Life Forums Mi vida digital Foros .
Related Articles Artículos relacionados
- Start, Stop and Restart Crond Daemon in Linux Start, stop y restart Crond Daemon en Linux
- Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 - Part 4 Instalación de Web Server en FreeBSD 6,0 con Apache 2,2, 5,0 MySQL y PHP 5 - Parte 4
- Starting Apache HTTPD Failed Due to Cannot Open or No Such mod_bwlimited, mod_log_bytes or mod_bandwidth Files A partir de Apache httpd Debido a Error No se puede abrir o No Such mod_bwlimited, mod_log_bytes o mod_bandwidth Archivos
- Apache Warn NameVirtualHost *:80 Has No VirtualHosts Error When Start Apache advertir NameVirtualHost *: 80 no tiene VirtualHosts error al comienzo
- Install mod_evasive for Apache to Prevent DDOS Attacks Mod_evasive para instalar Apache para prevenir los ataques DDoS
- Restart or Shutdown Windows (XP, 2000 and Vista) from Command Line or One-Click Shortcut Apagar o Reiniciar Windows (XP, 2000 y Vista) de línea de comandos o un clic Atajo
- Improve Apache Web Server Security: Use ServerTokens and ServerSignature to Disable Header Mejorar el servidor web Apache Seguridad: ServerTokens uso y ServerSignature para desactivar cabecera
- Automatically Shutdown Computer With Auto Shutdown Genius Automáticamente con el ordenador apagado automático de apagado genio
- cPanel WHM Failed to Receive Status Information From Apache Error cPanel WHM No se ha podido recibir la información de estado de error de Apache
- Apache Status (whm-server-status) in cPanel WebHost Manager Returns Blank Page Condición Apache (servidor-WHM-estado) en cPanel WebHost Manager Devoluciones página en blanco





