Analysis of apache server configuration and management in linux _ PHP Tutorial

Source: Internet
Author: User
The configuration and management of apache servers in linux are analyzed. I. two important directories: Apache has two important directories: 1. configuration directory etchttpdconf; 2. document directory varwww: 2. two configuration modes: Apache configuration under Fedora I. two important directories:
Apache has two important directories: 1. configuration directory/etc/httpd/conf; 2. document directory/var/www:

2. two configuration modes:
Apache has two configuration methods under Fedora: text mode (terminal command line) and graphical configuration. The two have their own advantages: Graphical configuration is easier to use. in text mode, you can directly edit the httpd. conf file, which is more flexible and direct.

III. Apache service startup and shutdown
You can stop, start, or close an Apache service in two modes: text (terminal) mode and graphical interface.

4. Terminal Operations
If you want to use Linux as the WWW server, we recommend that you do not install graphical interfaces (Xwindow, KDE, or GNOME desktop). Obviously, not installing these programs will significantly improve the system performance, easy to operate and beautiful interfaces are costly. I think the essence of Linux lies in the richness of command lines. Linux commands can complete all tasks.

1. start, restart, and stop Apache services:
Switch the cd/etc/init. d command 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
Start Apache automatically
Switch the cd/sbin command to the/sbin directory and run the chkconfig command. parameter:./chkconfig -- level5httpdon
./Chkconfig -- list can check whether httpd is automatically started when it is started. if it is 5: started, it indicates that it is automatically started when it is started.

2. configuration
Switch the cd/etc/httpd/conf command to the/etc/httpd/conf directory, and use the vi editor to open and edit httpd. conf configuration. to prevent configuration errors, back up httpd before configuration. conf.
In the httpd. conf file, # is followed by a comment to help us configure.
Once again, I emphasize that linux's command tools 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 and learn from each other on the Internet.

Apache has two important directories: 1. configuration directory/etc/httpd/conf; 2. document directory/var/www: 2. two configuration modes: two types of Apache configuration under Fedora...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.