Apache HTTP Server Installation tutorial
The official Apache HTTP Server website is http://httpd.apache.org/. you can download the latest Apache HTTP server.
The first thing to note is that the Apache server does not have an official 64-bit version and is only prepared by a private expert. The installation steps are as follows.
- Download a 64bit apacheserver at https://blackdot.be/download-archive. Currently, the zip package name is httpd-2.2.19-win64.rar;
- Decompress the package to a directory, for example, my directory is D: \ ProgramFiles \ apachesoftwarefoundation \ httpd-2.2-x64;
- Modify the httpd. conf file in the conf Folder:
Replace the/httpd-2.2-x64 in the file with your own unzipped directory, such as D:/ProgramFiles/apachesoftwarefoundation/httpd-2.2-x64, note that the path here must use the slash '/';
Change Listen 80 to listen 8080 (you can also specify the port and add a colon to the IP address to access the port). If IIS is enabled, port 80 is unavailable;
Remove # At the top of the line # loadmodulerewrite_modulemodules/mod_rewrite.so.
- Run the installation command. Run the command line to enter the bin folder under your installation directory, such as D: \ ProgramFiles \ Apache Software Foundation \ httpd-2.2-x64 \ bin, execute the command httpd.exe-kinstall, so that Apache is added to the system service, the default service name is apache2.2. The command for starting a service is httpd.exe-kstart.
- Test whether the installation is successful. Open the service and run the Apache server. Open the browser and enter http: // localhost: 8080/. If it works is displayed on the page !, The installation is successful, and the Apache server can be used normally.
- To make Apache server contain a specified directory, modify the httpd. conf file in the conf Folder:
DocumentRoot "D:/ProgramFiles/apachesoftwarefoundation/httpd-2.2-x64/htdocs", change to the directory to be included. For example, DocumentRoot "D:/ftp"
- If you don't have permission to access on this server appears on the webpage, the following solutions are available:
- Modify directory permissions:
<Directory/> Options FollowSymLinks AllowOverride None Order deny,allow Deny from all</Directory>
Change
<Directory/> Options Indexes FollowSymLinks AllowOverride None</Directory>
- Modify access permissions:
Allow from 127.0.0.1
Change
Allow from 127.0.0.1
Apache HTTP Server Installation tutorial