Prev | Next |
Web Server Installation and Configuration
As noted in the "WebEA Installation and Configuration" topic, WebEA requires a web server with PHP 8.1 or later. The web server can be either IIS or Apacahe, and the specific steps for setup can vary depending on Operating System, PHP Version etc. The following page provides an example of steps for installing Apache and PHP on Windows and configuring them to support hosting WebEA.
The process is based on these assumptions:
- The installation is on the Windows 8 operating system (64 bit).
- Apache will be installed to C:/Apache24
- PHP will be installed to C:/php
Important: These steps only cover the basic setup of Apache and PHP with adjustments to support WebEA. This does NOT take networking, SSL/HTTPS or security configuration into account, these are outside the scope of this documentation.
1. Install Apache
Step |
Description |
---|---|
1.1 |
Open the following link in your web browser: https://www.apachelounge.com/download/ As mentioned on this page, if it is not installed already, download and install the Visual C++ Redistributable Visual Studio 2015-2022 via the " vc_redist_x64" link. |
1.2 |
Download apache (e.g. httpd-2.4.XX-XXXXXX-win64-VS17.zip) Open the apache zip file and copy the Apache24 folder to C: drive root (I.e. C:\Apache24). |
1.3 |
Open the Windows "Environment Variables" configuration. Under "System variables", select the "Path" variable, then "Edit" to display the "Edit environment variable" dialog. Select "New", and add an entry for the Apache24 folder: C:\Apache24\bin |
1.4 |
Open the Windows Command Prompt as Administrator and enter the following command: path You should see the new "C:\Apache24\bin" path listed. Now enter the following command to install Apache: httpd -k install |
1.5 |
Open Windows services and you should find "Apache24" listed. Start the service, it should now say status Running. |
1.6 |
Test apache by opening a web browser and enter the URL "localhost". You should see the message: "It works!" |
2. Install PHP
Step |
Description |
---|---|
2.1 |
Open the following URL in your web browser: https://windows.php.net/download/ |
2.2 |
Download the Thread Safe version of the PHP Zip file and extract it to C:\php |
2.3 |
Open the Windows "Environment Variables" configuration. Under "System variables", select the "Path" variable, then "Edit" to display the "Edit environment variable" dialog. Select "New", and add an entry for the php folder: C:\php |
2.4 |
Open command prompt (if it was still open then close/re-open it), then enter the following command: path You should see the new "C:\php" path listed. Enter the following command to confirm PHP is installed and it is the expected version: php -v |
3. Configure Apache
Step |
Description |
---|---|
3.1 |
Open the apache config file (C:\Apache24\conf\httpd.conf) in a text editor. |
3.2 |
Scroll to the end of the file and add the following: # load the php module LoadModule php_module "c:/php/php8apache2_4.dll" <FilesMatch \.php$> SetHandler application/x-httpd-php </FilesMatch> # configure the path to php.ini PHPIniDir "C:/php" |
3.3 |
Also, in the httpd.conf file, find the following line: DirectoryIndex index.html Change it to: DirectoryIndex index.html index.php This configures Apache to load index.php files. |
4. Configure PHP
Step |
Description |
---|---|
4.1 |
Open the php folder (C:/php) in Windows Explorer. Copy the php-ini.production file and rename it to php.ini |
4.2 |
Open the php.ini file in a text editor. Find the section defining PHP extensions (e.g. search for "extension=curl"). Typically you will find a list of extensions which are commented out by default. Find each of the following lines and remove the comment character (;). ;extension=curl ;extension=gettext ;extension=mbstring ;extension=openssl |
5. Test Apache and PHP
Step |
Description |
---|---|
5.1 |
Open the command prompt and enter the following command: httpd -t This will check if there are any errors in the config. If not, it should display: Syntax OK |
5.2 |
Open Windows Services and restart the Apache24 service. |
5.3 |
In the C:\Apache24\htdocs folder create a php file named index.php with the following content: <?php phpinfo(); ?> |
5.4 |
Opening a web browser and enter the URL "localhost". This should display the PHP info page (version, configuration, modules etc). |
Complete
The basic Apache and PHP installation is now complete. WebEA can now be hosted on the server by copying the WebEA files into the website root folder (htdocs).