Start and Restart Apache 2 Web Server in linux

An Apache 2 start or restart Web Server under a Debian / Ubuntu / Linux or UNIX-like operating systems?


DEBIAN/UBUNT LINUX SYSTEM USERS

Use the following systemctl or service command on Debian Linux system

## Start command ##Sudo service apache2 start## Stop command ##
sudo service apache2 stop
## Restart command ##sudo service apache2 restart

## Start command ##systemctl start apache2.service
## Stop command ##
systemctl stop apache2.service
## Restart command ##
systemctl restart apache2.service

To START Apache 2 web server, enter:

# /etc/init.d/apache2 start
OR
$ sudo /etc/init.d/apache2 start
OR
$ sudo service apache2 start

To STOP Apache 2 web server, enter:



# /etc/init.d/apache2 stop
OR
$ sudo /etc/init.d/apache2 stop
OR
$ sudo service apache2 stop

No comments:

Post a Comment

how to call ssh from vs code

 To call SSH from VS Code, you can use the built-in Remote Development extension. This extension allows you to open a remote folder or works...