In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
How to configure the apache server globally, I believe many inexperienced people are at a loss about this. Therefore, this paper summarizes the causes and solutions of the problem. Through this article, I hope you can solve this problem.
Apache server global configuration details, introduce a lot of server-related knowledge.
Server identity configuration for global configuration of Apache server
Server identity related instructions:
ServerName
ServerAdmin
ServerSignature
ServerTokens
UseCanonicalName
UseCanonicalPhysicalPort
The ServerAdmin and ServerTokens directives control which information about the server will appear in the documents generated by the server, such as error messages. The ServerTokens directive sets the value of the server HTTP response header field.
The ServerName, UseCanonicalName, and UseCanonicalPhysicalPort instructions are used to determine how to build a self-referenced URL. For example, if a client requests a directory but does not include the last slash "/" of the directory name, Apache redirects the client to the full name that contains "/" so that the client can correctly resolve the relative references in the document.
ServerName instruction
Syntax: ServerName [scheme://] FQDN [: port]
This directive is used to set the hostname and port number that the server uses to identify itself. Mainly used to create a redirect URL.
For example, your web server's hostname is example.bob.com, but your web server also has a DNS alias www.bob.com in the DNS server. If you want the web server to be more significant, you can use the ServerName directive in http.conf to do this:
ServerName www.bob.com:80
When no ServerName is specified, the server attempts to reverse query the IP address to infer the hostname. If no port number is specified in ServerName, the server listens on all ports. To enhance reliability and predictability, you should use the ServerName display to specify a hostname and port number.
If you are using a domain name-based virtual host, the ServerName baby in the segment will be named Baodian http://www.bbqmw.net/qm_bbqmbd/ to match the virtual host, and the host name must be written in the header of the "Host:" request.
ServerAdmin instruction
Syntax: ServerAdmin email-address | URL
This directive is used to set the administrator email address contained in the error message returned by the server to the client. It is convenient for the user to contact the administrator in time after receiving the error message.
ServerAdmin bob@126.com
ServerSignature instruction
Grammar: ServerSignature. | | Off | Email |
Default: ServerSignature Off
This directive is used to configure the footer of the server-side generated document (error message, FTP directory list of mod_proxy, output of mod_info). The main reason for using this instruction to enable this footer is that when you are in a proxy server chain, it is almost impossible for the user to identify which server in the chain actually generated the returned error message.
The directive in http.conf defaults to Off, so there are no error lines; using On simply adds a line about the server version and the ServerName that is providing the service
For example, I use ServerSignature. The following message appears when the web page is not open:
Apache/2.2.11 (Unix) PHP/5.2.8 Server at 192.168.120.240 Port 80
For versions later than 2.0.44, the display of the detailed server version number will be controlled by the ServerTokens instruction.
ServerTokens instruction
Syntax: ServerTokens Major | Minor | Min [imal] | Prod [uctOnly] | OS | Full
Default: ServerTokens Full
This directive is used to control whether the "Server:" response header that the server responds to the client contains information about the type of server operating system and the module description compiled.
Note: when using the ServerTokens directive, enable the ServerSignature directive first.
ServerTokens Prod [uctOnly]: the server sends (for example): Apache
Apache Server at 192.168.120.240 Port 80
ServerTokens Major: the server will send (for example): Apache/2
Apache/2 Server at 192.168.120.240 Port 80
ServerTokens Minor: the server will send (for example): Apache/2.2
Apache/2.2 Server at 192.168.120.240 Port 80
After reading the above, have you mastered how to configure the apache server globally? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.