This article mainly introduces the detailed installation and configuration tutorial of Windows Apache2.4 VC9 (ApacheHaus). Friends in need can refer to
1, Apache download
Select a version and click Download
ServerRoot "C:/Users/myPC/Downloads/httpd-2.2.31-x86-r3/Apache22"
DocumentRoot "F:/"
<Directory "F:/"> # # Possible values for the Options directive are "None", "All", # or any combination of: # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews # # Note that "MultiViews" must be named *explicitly* --- "Options All" # doesn't give it to you. # # The Options directive is both complicated and important. Please see # http://httpd.apache.org/docs/2.2/mod/core.html#options # for more information. # Options Indexes FollowSymLinks # # AllowOverride controls what directives may be placed in .htaccess files. # It can be "All", "None", or any combination of the keywords: # Options FileInfo AuthConfig Limit # AllowOverride None # # Controls who can get stuff from this server. # Order allow,deny Allow from all </Directory>
ScriptAlias /cgi-bin/ "C:/Users/myPC/Downloads/httpd-2.2.31-x86-r3/Apache22/cgi-bin"
<Directory "C:/Users/myPC/Downloads/httpd-2.2.31-x86-r3/Apache22/cgi-bin"> AllowOverride None Options None Order allow,deny Allow from all </Directory>
3, configure Apache 2--ssl configuration
If you start the service like this, the following message dialog will generally appear Box:<VirtualHost _default_:443> SSLEngine on ServerName localhost:443 SSLCertificateFile C:/Users/myPC/Downloads/httpd-2.2.31-x86-r3/Apache22/conf/ssl/server.crt SSLCertificateKeyFile C:/Users/myPC/Downloads/httpd-2.2.31-x86-r3/Apache22/conf/ssl/server.key DocumentRoot F:/ # openssl req -new > server.csr # openssl rsa -in privkey.pem -out server.key # openssl x509 -in server.csr -out server.crt -req -signkey server.key -days 2048 <FilesMatch "\.(cgi|shtml|phtml|php)$"> SSLOptions +StdEnvVars </FilesMatch> <Directory "/Apache22/cgi-bin"> SSLOptions +StdEnvVars </Directory> BrowserMatch "MSIE [2-5]" \ nokeepalive ssl-unclean-shutdown \ downgrade-1.0 force-response-1.0 CustomLog "C:/Users/myPC/Downloads/httpd-2.2.31-x86-r3/Apache22/logs/ssl_request.log" \ "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b" </virtualhost>
<VirtualHost *:443> SSLEngine on ServerName serverone.tld:443 SSLCertificateFile C:/Users/myPC/Downloads/httpd-2.2.31-x86-r3/Apache22/conf/ssl/serverone.crt SSLCertificateKeyFile C:/Users/myPC/Downloads/httpd-2.2.31-x86-r3/Apache22/conf/ssl/serverone.key DocumentRoot F:/ # openssl req -new > serverone.csr # openssl rsa -in privkey.pem -out serverone.key # openssl x509 -in serverone.csr -out serverone.crt -req -signkey serverone.key -days 2048 <FilesMatch "\.(cgi|shtml|phtml|php)$"> SSLOptions +StdEnvVars </FilesMatch> <Directory "/Apache22/cgi-bin"> SSLOptions +StdEnvVars </Directory> BrowserMatch "MSIE [2-5]" \ nokeepalive ssl-unclean-shutdown \ downgrade-1.0 force-response-1.0 CustomLog "C:/Users/myPC/Downloads/httpd-2.2.31-x86-r3/Apache22/logs/ssl_request.log" \ "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b" env=HTTPS </virtualhost>
<VirtualHost *:443> SSLEngine on ServerName servertwo.tld:443 SSLCertificateFile C:/Users/myPC/Downloads/httpd-2.2.31-x86-r3/Apache22/conf/ssl/servertwo.crt SSLCertificateKeyFile C:/Users/myPC/Downloads/httpd-2.2.31-x86-r3/Apache22/conf/ssl/servertwo.key DocumentRoot F:/ # openssl req -new > servertwo.csr # openssl rsa -in privkey.pem -out servertwo.key # openssl x509 -in servertwo.csr -out servertwo.crt -req -signkey servertwo.key -days 2048 <FilesMatch "\.(cgi|shtml|phtml|php)$"> SSLOptions +StdEnvVars </FilesMatch> <Directory "/Apache22/cgi-bin"> SSLOptions +StdEnvVars </Directory> BrowserMatch "MSIE [2-5]" \ nokeepalive ssl-unclean-shutdown \ downgrade-1.0 force-response-1.0 CustomLog "C:/Users/myPC/Downloads/httpd-2.2.31-x86-r3/Apache22/ssl_request.log" \ "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b" </virtualhost>
As an administratorEnter the bin folder under the Apache program folder and enter httpd -k install to complete the installation of the Apache service.
Then double-click ApacheMonitor.exe in the bin directory, click start on the right to start the server, if normal, as shown below:5, others
Uninstall Apache HTTP Server:
Enter the bin directory as an administrator and use httpd -k uninstall to remove the service
Using the httpd -w -n "Apache2" -k start command to start the server can display the logs during the startup process to facilitate error analysis.
The above is the detailed content of Detailed explanation of Windows Apache2.4 VC9 (ApacheHaus) installation tutorial. For more information, please follow other related articles on the PHP Chinese website!