Install Apache In Windows 10

This article picks up where we left off in my last article titled “XAMPP or WampServer or…? Think again!” where basic idea was to point out that you might not need bulky WAMP packages, and we also covered simpler yet smarter alternatives. In this article, we are going to install Apache 2.4 and PHP 7.1 on a Windows 10 machine.

If you don’t really require components such as FileZilla FTP server, Mercury Mail, MySQL or MariaDB, Perl, etc… that comes built-in with XAMPP, you can always opt to individually install the ones that you do need. This is in fact a better and modest choice.

Before we proceed…

Install Apache HTTP web server on Windows 10 -WSL Step 1: Enable WSL on Windows 10 or 2016 server. If you haven’t enabled the WSL yet, then simply search for “Turn Windows feature on or off” in the Windows search box and open it. From where select Windows subsystem for Linux to enable it. In this tutorials, I am going to show you how to setup or install ant on windows 10 operating system. Download apache ant and setting Ant home along with JAVAHOME on windows 10 is something different here a step by step tutorials for installing apache ant and set ANTHOME and set JAVAHOME. How to Download and Install NetBeans IDE on Windows 10: this is a step by step guide on how to download and install NetBeans 10.0 and Java JDK 11 on Windows 10. The incubating versions of NetBeans 10 do not come with an installer, hence we will use the binary files provided by Apache.

Are you certain that your app “requires” to be developed in Apache environment? You may also look at this article that covers installing and configuring PHP 7 with Nginx web server on windows 10. Most importantly, If you are just looking forward to execute simpler PHP scripts or tests in a web browser then you don’t really need a fully loaded web server since PHP has its own built-in web server since PHP 5.4, and our primary article covers how you can use it, click here.

If you are planning to install Apache, PHP and MySQL on Windows 10 machine, then you can do so by choosing any of the two options given below: You can use any ready-to-use packages like: WampServer, XAMPP etc. You can make your own fully functional WAMP server (Manual Installation). Install Tomcat as Windows services. Open command prompt and go to the apache tomcat bin directory., similar like below. Tags: apache tomcat, Apache Tomcat Installation, Install apache tomcat, Install tomcat on Windows, Tomcat Comments Off on How to install tomcat 9 on Windows 10. Related Posts. Create WebLogic domain -12C. Apache Tomcat is a Java base web server. Without Java servlet can’t be run apache tomcat. So you must install Java and tomcat on your windows 7/8.1/10 machine. Java and Tomcat is an open-source software. Now click ok, and the windows will keep closing. This has to be done because the Web Server’s daemon runs as a Service on windows. Press win+R, or open Run. Find the ‘Apache’ service, right click on it and press start. Open Command Prompt as Admin, and write. Httpd –k install. When the window pops “Allow Access”.

1. Prerequisites

You need to have Microsoft Visual C++ Redistributable 15 (2017) and/or 14 (2015) (depending on packages that you select) installed on your PC beforehand. If not already installed, You may download VC15 and 14 from official Microsoft page: https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads

2. Installing PHP 7.1

Note: Procedure is identical if you want to install a different version of PHP (i.e. 7.0 or 7.2)

  1. Download thread-safe PHP 7.1 binaries from this official PHP downloads page for Windows OS.
  2. Extract ZIP archive on a relevant location. (i.e. C:PHP7.1)
  3. Rename the php.ini-development file to simply php.ini

3. Installing Apache 2.4 web server

Please note that binaries for Windows 10 are not directly downloadable from official Apache website. Therefore you may download latest binaries of Apache 2.4 for Windows from either ApacheHaus or ApacheLounge.

The Apache HTTP Server Project itself does not provide binary releases of software, only source code. Individual committers may provide binary packages as a convenience, but it is not a release deliverable.

Install Apache On Windows 10

  1. Download a binaries package. In this example, I have downloaded Apache 2.4.29 for VC15 from ApacheLounge downloads page.
  2. Obviously, Extract this ZIP archive once downloaded
  3. Copy Apache24 directory into drive C: (i.e. C:Apache24)

4. Configuring Apache 2.4 to work with PHP 7.1

Install Apache On Windows 10 64 Bit

  1. Open httpd.conf file in C:Apache24conf in a text editor.
  2. Find DocumentRoot declaration and change paths to your own working directory. (You may also skip this step by simply moving all your work files to working directory that is already configured)
    So, if your working directory is D:Work, you will change paths to:
  3. Find DirectoryIndex directive and add “index.php”
  4. Add following lines at top of this httpd.conf file:
    LoadModule php7_module'c:/PHP 7.1/php7apache2_4.dll'PHPIniDir'c:/PHP 7.1'AddHandler application/x-httpd-php.phpAddType application/x-httpd-php.php
  5. Save and close configuration file!

Apache Php Windows 10

5. Testing

Install Apache Spark In Windows 10

  1. Create a simple phpinfo file in your working directory
  2. Execute C:Apache24binhttpd.exe file (Command prompt window will stay open until you close this window or terminate process manually which will cause Apache to stop working as well)
  3. Open web browser and visit http://localhost/ to open your phpinfo file

Here are screenshots from a local machine after successful installation:

6. Install Apache 2.4 as service

Optionally, you may install Apache 2.4 as service to have it running in background all the time. This may be preferred since you will not be required to keep a command prompt window open all the time.

  1. Open command prompt (as Administrator)
  2. Navigate to c:Apache24bin
  3. To install, execute httpd.exe-kinstall
  4. To start or stop, execute net start Apache2.4 or net stop Apache2.4
  5. To uninstall as service, execute httpd.exe-kuninstall

Note: You may also create a shortcut to “ApacheMonitor.exe” on desktop. Opening this will show ApacheMonitor icon in notifications tray area and you will be able to manage Apache 2.4 once it has been installed as service.