In Linux, a web server is basically implemented based on httpd. To use a web server, you must first install the httpdyuminstallhttpd software package on httpd, there are three main types of installation: the most basic httpd tool and httpd. i386 is our httpd tool httpd-devel.i386 and is a server software package
In Linux, a web server is basically based onHttpdSo to use the web server, you must first install httpd
Yum install httpd
There are three main types of httpd software packages
The most basic httpd tool is installed.
Httpd. i386 is our httpd tool.
Httpd-devel.i386 is a server package
Httpd-manual.i386 is a variety of instructions, help documentation.
Small extension:
All configuration files are saved in the/etc/httpd directory.
Related log files are stored in/var/log/httpd.
Relevant modules are in/usr/lib/httpd/moDuLes
Related pIdAll files are in/var/run
Related binary files/usr/sbin/usr/bin
Service Script:/etc/rc. d/init/httpd
In the/etc/httpd directory
./Conf directory: stores the main configuration file.
. /Conf. d directory: stores the files that can be divided into configuration files and loaded at startup. all files ending with conf are loaded together when the master configuration file is loaded.
After httpd is installed, we can enable this service!
- Service httpd start
- Service httpdStatUs
Enable httpd and listener
Small extension:
We often use nststat-tnlCommandTo check whether port 80 is enabled.
Service httpd reload and use this command to re-read the configuration file
After enabling it, you can enter our ip address in your browser!
We see REdWhy is a welcome page that Hat has prepared for us?
In fact, our correct homepage is named "ind" in the/var/www/html/directory by default.Ex. Html
When we do not have this file, it will automatically read the welcome. conf file under/etc/httpd/conf. d/. This file is the home page we can see now!