Home > Backend Development > PHP Tutorial > A brief analysis of the configuration and management of apache server under Linux_PHP tutorial

A brief analysis of the configuration and management of apache server under Linux_PHP tutorial

WBOY
Release: 2016-07-21 14:58:45
Original
751 people have browsed it

1. Two important directories:
Apache has two important directories: 1. Configuration directory /etc/httpd/conf; 2. Document directory /var/www:

2. Two configuration modes:
Two configuration methods for Apache under Fedora: text mode (terminal command line) and graphical configuration. Both have their own advantages: graphical configuration is easier to get started, and editing the httpd.conf file directly in text mode is more free and direct.

3. Starting and shutting down the Apache service
Stopping, starting, and shutting down the Apache service can be operated in two modes: text (terminal) mode and graphical interface.

4. Operations under the terminal
If you want to use Linux as a WWW server, I recommend not to install a graphical interface (i.e. Xwindow, KDE or GNOME desktop). Obviously do not install these programs. Significantly improved system performance, ease of operation and a beautiful interface come at the price. I think the essence of Linux lies in the richness of the command line. Linux commands can accomplish all tasks.

1. Start, restart and stop Apache service:
cd/etc/init.d command switches to the /etc/init.d directory and run the following command:
./ httpdstart//Start the Apache service
./httpdrestart//Restart the Apache service
./httpdstop//Stop the Apache service
Automatically start the Apache service at boot
Cd/sbin command to switch to the /sbin directory, Run the chkconfig command, parameters: ./chkconfig--level5httpdon
./chkconfig--list to check whether httpd starts automatically at boot. If 5: starts, it means it starts automatically at boot.

2. Configuration
cd/etc/httpd/conf command switches to the directory /etc/httpd/conf, use vi editor to open and edit the httpd.conf configuration, before configuring, in order To prevent configuration errors, back up httpd.conf first.
In the httpd.conf file, # is followed by a comment section to help us configure.
Once again, I emphasize that the command tools of Linux are very powerful. To learn Linux, you must learn its command line tools. Only by learning these commands can you master the essence of Linux! I share ideas and learn from each other online.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/328188.htmlTechArticle1. Two important directories: Apache has two important directories: 1. Configuration directory /etc/httpd/ conf; 2. Document directory/var/www: 2. Two configuration modes: Two configurations of Apache under Fedora...
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