How to start apache in linux

藏色散人
Release: 2019-08-07 10:27:17
Original
7126 people have browsed it

How to start apache in linux

Recommended: [Linux video tutorial]

How to start apache in Linux?

Basic operation method:

This article assumes that your apahce installation directory is /usr/local/apache2, these methods are suitable for any situation

apahce start command:

Recommended/usr/local/apache2/bin/apachectl start apaceh start

apache stop command

/usr/local/apache2/bin/ apachectl stop Stop

apache restart command:

/usr/local/apache2/bin/apachectl restart Restart

To restart the Apache server without interrupting the current connection, You should run:

/usr/local/sbin/apachectl graceful

If apache is installed as a Linux service, you can use the following command:

service httpd start start

service httpd restart Restart

service httpd stop Stop the service

Linux system is Ubuntu

1. Start Apache 2 Server /Start apache service

# /etc/init.d/apache2 start
or
$ sudo /etc/init.d/apache2 start
Copy after login

2. Restart Apache 2 Server /Restart apache service

# /etc/init.d/apache2 restart
or
$ sudo /etc/init.d/apache2 restart
Copy after login

3. Stop Apache 2 Server /Stop apache service

# /etc/init.d/apache2 stop
or
$ sudo /etc/init.d/apache2 stop
Copy after login

More Apache related knowledge , please visit the Apache usage tutorial column!

The above is the detailed content of How to start apache in linux. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template