Skip to content

Installation Guide

Keramat Jokar edited this page Oct 7, 2024 · 4 revisions

Install Laragon on Windows

1. Download Laragon

First, download Laragon from the following link:

Download Laragon

2. Install Laragon

  1. Open the downloaded installer (laragon-wamp.exe).
  2. Follow the installation steps:
    • Choose the installation path for Laragon.
    • Accept the default settings (or customize if necessary).
    • Click Install to begin the installation process.

3. Install PHP 8.3

  1. After installing Laragon, navigate to the installation directory (e.g., C:\laragon).
  2. Go to the bin\php folder.
  3. Download PHP 8.3 from PHP website.
  4. Extract the contents of the downloaded file into a folder named php-8.3.x inside the bin\php directory.
  5. To switch to PHP 8.3 in Laragon:
    • Open Laragon.
    • Go to Menu > PHP and select PHP 8.3 from the list.

4. Install Apache 2.4.62

  1. Navigate to C:\laragon\bin\apache.
  2. Download Apache 2.4.62 (win64) from Apache Lounge.
  3. Extract the contents of the downloaded file into a folder named httpd-2.4.62-win64-VS17 inside the bin\apache directory.
  4. To switch to Apache 2.4.62 in Laragon:
    • Open Laragon.
    • Go to Menu > Apache and select Apache 2.4.62 from the list.

5. Restart Laragon

  1. After making the changes, restart Laragon.
  2. You should now be able to use PHP 8.3 and Apache 2.4.62.

Note

  • To verify that everything is set up correctly, you can check the PHP and Apache versions from Laragon’s Terminal:
    • To check the PHP version: run the command php -v.
    • To check the Apache version: run the command httpd -v.

Now your Laragon setup is ready with PHP 8.3 and Apache 2.4.62!


Install Apache and PHP 8.3 on Linux

1. Install Apache

To install Apache on a Linux system (such as Ubuntu or Debian), follow these steps:

  1. Update the package list:
    sudo apt update
    
  2. Install Apache:
    sudo apt install apache2 -y
    
  3. Start and enable Apache to run on boot:
    sudo systemctl start apache2
    sudo systemctl enable apache2
    
  4. Verify Apache installation: Open your web browser and navigate to http://localhost. You should see the Apache default page.

2. Install and Configure Apache with PHP 8.3

  1. To install PHP 8.3:
    sudo add-apt-repository ppa:ondrej/php
    sudo apt update
    
  2. Enable the PHP 8.3 module for Apache:
    sudo a2enmod php8.3
    
  3. Restart Apache to apply changes:
    sudo systemctl restart apache2
    

Enabling PHP Extensions and Apache/Nginx Modules

1. Enable PHP Extensions

To enable the following PHP extensions: mysqli, curl, openssl, soap, mbstring, json, zip, gd, intl, and gmp, follow these steps:

  1. Navigate to your PHP installation directory (e.g., C:\laragon\bin\php\php-8.3.x).
  2. Open the php.ini file using a text editor (e.g., Notepad).
  3. Search for the extensions you need to enable by finding lines similar to the following:
    ;extension=mysqli
    ;extension=curl
    ;extension=openssl
    ;extension=soap
    ;extension=mbstring
    ;extension=json
    ;extension=zip
    ;extension=gd
    ;extension=intl
    ;extension=gmp
    
  4. Remove the semicolon ; from the beginning of the lines to uncomment and enable the extensions:
    extension=mysqli
    extension=curl
    extension=openssl
    extension=soap
    extension=mbstring
    extension=json
    extension=zip
    extension=gd
    extension=intl
    extension=gmp
    
  5. Save the php.ini file and restart your web server (Laragon, Apache, or Nginx) for the changes to take effect.

2. Enable Apache Modules

To enable the following Apache modules: mod_rewrite, mod_headers, mod_expires, mod_deflate, and mod_filter, follow these steps:

  1. Navigate to the Apache installation directory (e.g., C:\laragon\bin\apache\httpd-2.4.62-win64-VS17).
  2. Open the httpd.conf file using a text editor.
  3. Search for the following modules:
    #LoadModule rewrite_module modules/mod_rewrite.so
    #LoadModule headers_module modules/mod_headers.so
    #LoadModule expires_module modules/mod_expires.so
    #LoadModule deflate_module modules/mod_deflate.so
    #LoadModule filter_module modules/mod_filter.so
    
  4. Remove the # at the beginning of the lines to enable the modules:
    LoadModule rewrite_module modules/mod_rewrite.so
    LoadModule headers_module modules/mod_headers.so
    LoadModule expires_module modules/mod_expires.so
    LoadModule deflate_module modules/mod_deflate.so
    LoadModule filter_module modules/mod_filter.so
    
  5. Save the httpd.conf file and restart Apache to apply the changes.

Now your Apache setup is configured with the required modules. Open your domain.