In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
How to configure Apache under Windows? This problem may be often seen in our daily study or work. I hope you can gain a lot from this question. The following is the reference content that the editor brings to you, let's take a look at it!
one。 Basic introduction to Apache
Apache HTTP Server (abbreviated as Apache) is an open source web server, which uses port 80 by default, usually uses tomcat or php to deal with dynamic content, and uses mysql as the database. The installation and configuration of tomcat and php and mysql can be found in other documents. This document is only about the installation and configuration of apache. (what is the apache server)
two。 Installation of Apache
Download the apache installation package, double-click to start the installation, click next, enter your domain name (e.g. test.com) under Network Domain when the system setup information appears, enter your server name (e.g. www.testr.com, that is, hostname plus domain name) under Server Name, and fill in the contact email address of the system administrator (e.g. test@aliyun) under Administrator's Email Address. All three messages can be entered arbitrarily. The website can be configured later.
Choose to install all, we choose to install on D disk, the installation is complete. Note: you can also use the PHP integrated environment tool phpStudy for Apache installation.
three。 Basic configuration of Apache
One way to start and close 1.apache is the icon operation in the lower right corner.
The other is to start the menu bar operation.
2.apache logs, access logs and error logs can be viewed from the start menu or under% home%\ logs.
The configuration file for 3.apache can also be viewed in the start menu bar, or in% home%\ conf\.
4. Configure the apache site
(1) configure the domain name and bind site IP first. The binding domain name can be set when installing apache, and the ServerName option can be changed in the configuration file% home%\ conf\ httpd.conf after installation.
Binding IP can be set in the Listen option.
(2) set the home directory of the website, which can be set in the DocumentRoot field in the configuration file.
(3) the home page of the website can be set through the DirectoryIndex field.
(4) Log settings. You can set the path to access the log in Customlog and set the format of the log through LogFormat.
The path to the error log is defined through the ErrorLog field. LogLevel records the level of the log, which is set to log above the warning message.
5.apache virtual host configuration
(1) IP-based virtual host, the meaning of each noun has been explained earlier, so I will not repeat it here.
(2) Virtual host based on domain name
four。 PHP configuration
1. Create a new directory php on disk D, and extract the php package to php.
two。 Change the name of D:\ php\ php.ini-development to php.ini
3. Add the support module for php to the configuration file httpd.conf of apache.
4. See the database documentation for php connection database settings.
Appendix 1
The format and meaning of Apache access Log
Example: 192.168.157.1-[26/Dec/2012:09:14:43 + 0800] "GET / favicon.ico HTTP/1.1" 404 209
1. Client IP 2.-(E-mail) 3.-(login), 4. Request time 5. Method + resource + protocol 6. Status code 7. Number of bytes sent
The format and meaning of Apache error log
Example: [Wed Dec 26 09:20:46 2012] [error] [client 192.168.157.1] File does not exist: D:/Program Files/Apache Software Foundation/Apache2.2/htdocs/favicon.ico
1. Time 2. Log level 3. Client IP 4. Error message
Thank you for reading! After reading the above, do you have a general idea of how to configure Apache under Windows? I hope the content of the article will be helpful to all of you. If you want to know more about the relevant articles, you are welcome to follow the industry information channel.
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.