First configure the /etc/services file, it is a database file, recorded All known service information for the Internet, each line in the file represents a service. The specific content contained in the line is as follows (the space is separated by a space or a tab):
The official service name port number Protocol name service alias
Note: The first 1024 ports of TCP/IP Reserved by the system, reserved ports can only be used by system processes or root processes. When running the server in the default standalone mode, the portnumber should be set to 80. However, when running the server in inetd mode, it should be set to 8080.
Then the /etc/inetd.conf file is configured. The meaning of each line in the /etc/inetd.conf file is as follows:
Service Name Socket Type Protocol Waiting /Not Waiting Run the service program's user ID
server program's parameters
(2). Running for the first time
Before running the server for the first time, you should include a file called index.html in the htdocs directory. Fortunately, this file is already included in the Apache standard distribution.
Now you can manually start httpd with the following command, run the server in the default standalone mode:
# /sbin/httpd -f /etc/httpd/conf/httpd .conf
Note: This is to be run as root, otherwise the TCP/IP port will not be bound to port 80, and the UID and GID cannot be changed to the settings specified in the configuration file. .
If you want to run the server as inetd, then you don't need to do anything else, because the system has already started it when it starts, and when inetd receives the http request, it will automatically start httpd.
(3). Server Debugging
Two typical error messages are given here for reference only.
Httpd: Could not open document config file ... ...
Fopen: No such file or directory.
Cause: The file path is incorrect. Because Apache does not look for a configuration file in the current directory when it starts.
Httpd:bad user name ... ...
Httpd:bad group name ... ...
Cause: The user or group set in the configuration file httpd.conf does not actually exist.
There are many popular servers at present, and some professional-grade FTP servers
The server is one of the more important devices in the LAN. If it accidentally fails, many access ac
Each time the server receives a request, it must be processed by IIS. This is not
In a network using the TCP/IP protocol, each computer must have at least one IP a
Apache Directory Configuration Method
IBM HTTP Server server installation complete diagram
Users of the remote login server for Windows 2003 & 2008
Apache configuration independent domain name method
Master emergency: What should I do if the server data is accidentally lost?
Let IIS support PHP configuration steps
Web Hosting IIS Prevents Intrusion Common Q&A
Win 2003 server scheduled restart command
Making DVD Raiders under Windows 7 - No other tools
Linux study notes - SSH password-free login
Upgrade win10 error 0x80070002 how to do
After the vps restarts, the mounted hard disk cannot recognize
Windows XP Advanced Techniques and Applications II
How to cancel the Windows 8 system boot requires a password
How to delete the win7 notification area icon? Win7 notification area icon delete graphic tutorial
Windows Task Manager menu bar, tab bar is missing solution
Win2003 is stronger than Linux
How does the forced shutdown of the computer affect the computer many times