Ga naar de inhoud

Start / Stop and Restart Apache met ubuntu linux

Restart Apache 2 web server, enter:
/etc/init.d/apache2 restart

OR
sudo /etc/init.d/apache2 restart

OR
sudo service apache2 restart

To stop Apache 2 web server, enter:
/etc/init.d/apache2 stop

OR
sudo /etc/init.d/apache2 stop

OR
sudo service apache2 stop

To start Apache 2 web server, enter:
/etc/init.d/apache2 start

OR
sudo /etc/init.d/apache2 start

OR
sudo service apache2 start

## Start command ##

via systemctl
sudo systemctl start apache2.service
## Stop command ##
sudo systemctl stop apache2.service
## Restart command ##
sudo systemctl restart apache2.service

sudo systemctl status apache2.service

type -a apachectl
type -a apache2ctl

Linux:  start – stop – restart Apache

# service apache2 start
service apache2 stop
service apache2 status
service apache2 restar

inicio del servidor web Apache:
$ sudo systemctl start apache2

Detención del servidor web Apache:
$ sudo systemctl stop apache2

Inicia y recarga
$ sudo systemctl restart apache2

 

recarga de la configuración:
$ sudo systemctl reload apache2

Al instalar Apache en Ubuntu, el servidor web se iniciará automáticamente en el arranque tras la configuración. También puedes desactivar esta función:
$ sudo systemctl disable apache2

Para volver a activar el inicio automático de Apache en el arranque, introduce el siguiente comando:
$ sudo systemctl enable apache2