Apache server is a binary file downloaded from Apache Haus site. The site introduction is compiled by visual c + +. Windows Server 2008 R2 system can’t run directly and will prompt the error of missing runtime. You can download Visual C + + 2015 from Microsoft official website and install it.
Because the IIS service occupies port 80 by default, Apache may need to modify the port number used, otherwise it will prompt related errors and make an attempt to access the socket in a way that the access permission is not allowed
At the same time, you need to check the port 443 used by the HTTPS protocol. The relevant configuration file is/conf/httpd.conf、/conf/extra/httpd-ahssl.confFor convenience, I directly replaced 80 and 443 with any unused port number
In this step, stepping into a pit, a large number of netizens said that they were modifying httpd- ssl.conf File. I have tried for a long time and found that it is useless, but it does have the syntax to listen on port 443. I think this may be the configuration of an old version, or it may be used for other operating systems. After configuring the above items, you can start the Apache service normally. The syntax for installing and using batch commands is as follows:
httpd.exe -k install httpd.exe -k start
Windows Server 2008 R2、Apache 2.4.38、Microsoft Visual C++ 2015