In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Apache profile
The default path of the configuration file for Apache is "/ etc/httpd/conf/httpd.conf". By editing this file, you can modify the configuration of Apache.
1. Set the home directory of the web page. The parameter DocumentRoot is the home directory where the web page is stored. Open the configuration file httpd.conf and look for DocumentRoot (approximately 292 lines)
[root@localhost ~] # gedit / etc/httpd/conf/httpd.conf
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
DocumentRoot "/ var/www/html" / / currently defaults to the "/ var/www/html" directory, where all web pages must be placed.
2. Set the connection port. Use the parameter listen to set the connection port. Default is 80. (about 136lines)
[root@localhost ~] # gedit / etc/httpd/conf/httpd.conf
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, in addition to the default. See also the
# directive.
#
# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses (0.0.0.0)
#
# Listen 12.34.56.78:80
Listen 80
3. Set the connection timeout and the parameter timeout. When the connection exceeds a certain idle time, it will be disconnected automatically. (about 68 lines)
# Timeout: The number of seconds before receives and sends time out.
#
Timeout 60
4. Set the character set and the parameter AddDefaultCharset. It is recommended to set utf-8, which is universal. (approximately 753 lines)
# Specify a default charset for all content served; this enables
# interpretation of all content as UTF-8 by default. To use the
# default browser choice (ISO-8859-1), or to allow the META tags
# in HTML content to override this choice, comment out this
# directive:
#
AddDefaultCharset UTF-8
5. Set the server name and parameter ServerName. This is the domain name of the server and must be resolved by dns before it can be accessed. If you don't have a legal domain name, you can only access it through an ip address.
# ServerName gives the name and port that the server uses to identify itself.
# This can often be determined automatically, but we recommend you specify
# it explicitly to prevent problems during startup.
#
# If this is not set to valid DNS name for your host, server-generated
# redirections will not work. See also the UseCanonicalName directive.
#
# If your host doesn't have a registered DNS name, enter its IP address here.
# You will have to access it by its address anyway, and this will make
# redirections work in a sensible way.
#
# ServerName www.example.com:80
6. Set keepalive to improve network efficiency, which is turned off by default. (approximately 76 lines)
# KeepAlive: Whether or not to allow persistent connections (more than
# one request per connection). Set to "Off" to deactivate.
#
KeepAlive Off
7. Set keepaliverequest. There is no limit when it is set to 0, but it is best to use the default value, or change it according to the situation. (about 83 lines)
# MaxKeepAliveRequests: The maximum number of requests to allow
# during a persistent connection. Set to 0 to allow an unlimited amount.
# We recommend ou leave this number high, for maximum performance.
#
MaxKeepAliveRequests 100
Transfer from http://blog.itpub.net/29270124/viewspace-2220980/ if there is any infringement, contact to delete.
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.