1. Two important directories:
Apache has two important directories: 1. Configuration directory /etc/httpd/conf; 2. Documentation directory /var/www:
2. Two configuration modes:
There are 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. X window, KDE or GNOME desktop). Obviously not installing these programs will significantly improve the performance of the system. The ease of operation and beautiful interface are important Pay 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 services of Apache:
The cd /etc/init.d command switches to the /etc/init.d directory and runs the following command:
./httpd start //Start the Apache service
./httpd restart //Restart the Apache service
./httpd stop //Stop the Apache service
Automatically start the Apache service at boot time cd /sbin command to switch to the /sbin directory, run the chkconfig command, parameters: ./chkconfig --level 5 httpd on
./chkconfig --list can check whether httpd starts automatically at boot. If 5: Start, it means it starts automatically at boot.
2. Configure the cd /etc/httpd/conf command to switch 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 and learn from each other online.