In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
In this issue, the editor will bring you about the configuration process of the non-installed version of Apache. The article is rich in content and analyzes and describes for you from a professional point of view. I hope you can get something after reading this article.
First, install and configure Apache2.4.25 (httpd-2.4.25-win64-VC14.zip)
1. Extract the downloaded installation package: httpd-2.4.25-win64-VC14 will put it in its own installation directory (directly to disk D)
2. Then modify the http.conf configuration file
(1) modify the root path of ServerRoot Apache:
Change ServerRoot "c:/Apache24" to = > ServerRoot "D:\ httpd-2.4.25-win64-VC14\ Apache24"
(2) modify ServerName your host name:
ServerNamewww.example.com:80 removes the previous #, which is needed when starting Apache from the command line.
(3) modify the home folder directory accessed by DocumentRoot Apache, which is the location of php and html code files. The default path for Apache is under htdocs (D:\ phpEnv\ Apache24\ htdocs), where there will be a simple entry file index.html. This path can be modified by itself or not. I didn't change it here.
DocumentRoot "c:/Apache24/htdocs"
Change to = >
DocumentRoot "D:\ phpEnv\ www"
(4) modify the configuration of the entry file: DirectoryIndex generally uses index.php, index.html and index.htm as the entry points for web projects. Only index.html needs to add the other two support for the default entry of Apache. Of course, the settings of this entry file can be added or decreased according to your own needs. If the requirement is relatively strict, you can only write an index.php, so the entry in the project can only be index.php.
(274 lines)
DirectoryIndexindex.html
Change to = >
DirectoryIndex index.php index.htm index.html
(5)
AllowOverride None
Options None
Require all granted
Change to = >
AllowOverride None
Options None
Require all granted
3. Then you can start Apache.
Start-run, type cmd, and open the command prompt. Then enter enter httpd under the D:\ httpd-2.4.25-win64-VC14\ Apache24\ bin directory, as shown in the figure. (you can also configure environment variables)
If there is no error, you can test it (keep the command window open).
When accessing with a browser, "It works" appears, which means that apache has been installed and started correctly. You can also write a simple index.html file by yourself or open it.
4. Add Apache to the window service startup item and set it to boot
First turn off the service of httpd (just close the command window)
Reopen a new command window and go to the D:\ httpd-2.4.25-win64-VC14\ Apache24\ bin directory:
The command to add the HTTP service is: httpd.exe-kinstall-n "servicename" servicename is the name of the service. What I add is: httpd.exe-kinstall-n "Apache24" command will prompt for success. At this time, you can see the Apache24 service in the window service startup item
Then click start, and you can change the startup type to manual if you don't want to set it to boot.
If you want to uninstall the service, first stop the service, and then type httpd.exe-k uninstall-n "Apache24" to uninstall the service.
Of course, you can also start Apache through the ApacheMonitor.exe under D:\ httpd-2.4.25-win64-VC14\ Apache24\ bin.
In this way, the configuration of Apache is almost complete.
This is how the configuration process of the non-installed version of Apache shared by the editor is like. If you happen to have similar doubts, you might as well refer to the above analysis to understand. If you want to know more about it, 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.