How to Install Joomla with Nginx and Let’s Encrypt SSL on Debian 11

11

Joomla! is without doubt one of the hottest Content Management Systems (CMSs) subsequent to WordPress. With Joomla, you’ll be able to create blogs, dialogue boards, and different internet sites.

It is loose, open-source, and works neatly with nearly any internet website hosting carrier, making it one of the vital absolute best to put in and use.

If you don’t have any internet website hosting but, we suggest putting in Joomla to your native Debian machine or VPS.

Here, we will be able to see the way to set up Joomla with Nginx on Debian 11.

Prerequisites

Install LEMP Stack

Follow the beneath hyperlinks to put in the LEMP stack to your Debian machine for Joomla set up.

Install EMP (Nginx, MariaDB, and PHP) on Debian 11

Install PHP Extensions

Use the apt command to put in PHP extensions required for Joomla.

sudo apt replace

sudo apt set up -y php-gd php-xmlrpc php-curl php-intl php-imagick php-mysql php-zip php-xml php-mbstring php-bcmath

Configure PHP Settings for Joomla

Joomla calls for a couple of PHP configurations like PHP brief listing, most allowed measurement for uploaded information to paintings accurately. So, edit the php.ini report.

sudo nano /and so forth/php/7.4/fpm/php.ini

Then, replace the beneath values as according to your requirement.

output_buffering = off # Required for Joomla

upload_tmp_dir = "/tmp"

upload_max_filesize = 64M

post_max_size = 64M

Setup Nginx Virtual Host for Joomla

We will get started with making a digital host for a Joomla set up. You can to find all Nginx’s digital host configuration information underneath /and so forth/nginx/conf.d listing.

Typically the digital host report incorporates a website title, port quantity, file root, log location, rapid CGI, and so forth.

For this text, I’m assuming the next:

Domain title: www.holhol24.internet
Port No: 80
Document root: /usr/proportion/nginx/www.holhol24.internet/html
Logs: /usr/proportion/nginx/www.holhol24.internet/logs

First, create a digital host configuration.

sudo nano /and so forth/nginx/conf.d/www.holhol24.internet.conf

Then, position the next content material into the above configuration report. You will want to alternate server_name as according to your requirement.

server {
	server_name www.holhol24.internet;
	root /usr/proportion/nginx/www.holhol24.internet/html;

	index index.php index.html;

	access_log /usr/proportion/nginx/www.holhol24.internet/logs/get admission to.log;
	error_log /usr/proportion/nginx/www.holhol24.internet/logs/error.log;

	# Prevent get admission to to sure report extensions
	location ~.(ini|log|conf)$ {
		deny all;
	}

	location ~ .php$ {
        # NOTE: You will have to have "cgi.fix_pathinfo = 0;" in php.ini
        come with fastcgi_params;
        fastcgi_intercept_errors on;
        fastcgi_pass unix:/run/php/php7.4-fpm.sock;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
	}

}

Create a file root and logs listing.

sudo mkdir -p /usr/proportion/nginx/www.holhol24.internet/html/

sudo mkdir -p /usr/proportion/nginx/www.holhol24.internet/logs/

Verify the Nginx configuration report with the beneath command.

sudo nginx -t

If you get the next, it signifies that the digital host configuration is right kind.

nginx: the configuration report /and so forth/nginx/nginx.conf syntax is fine
nginx: configuration report /and so forth/nginx/nginx.conf take a look at is a hit

Restart the Nginx and PHP-FPM products and services.

sudo systemctl reload nginx php7.4-fpm

Install Let’s Encrypt SSL Certificate

Create DNS Record

Go for your area registrar and create a DNS report [A and CNAME (optional if you do not want to use www subdomain)] report in your area.

  1. Non-www Domain Name (Ex. holhol24.internet) >> A report level for your server IP
  2. www Domain Name (Ex. www.holhol24.internet) >> CNAME report level to holhol24.internet

For this demo, I created two information in order that my Joomla web content might be obtainable at www.holhol24.internet.

DNS Records

Install Certbot consumer

The Certbot consumer, which is helping us generate and set up the Let’s Encrypt SSL certificates, is now to be had as a snap package deal for Debian running machine. So, first, set up snapd to your machine.

sudo apt replace

sudo apt set up -y snapd

Then, replace snapd to the newest model.

sudo snap set up core && sudo snap refresh core

Finally, set up the Certbot consumer the use of the snap command.

sudo snap set up --classic certbot

sudo ln -s /snap/bin/certbot /usr/bin/certbot

Install SSL Certificate

Use the certbot command to generate and set up the Let’s Encrypt SSL certificates for the Nginx internet server.

sudo certbot --nginx

1. Enter e-mail cope with to obtain notification on pressing renewal and safety notices
2. Type Y and press Enter to sign up with the ACME server
3. Type Y or N to obtain emails about EFF information, campaigns, publication.
4. Certbot will mechanically hit upon the Joomla area and ask you permission to turn on HTTPS in your Joomla web content. Type 1 or suitable numbers separated through a comma when you have more than one internet sites.

Which names do you want to turn on HTTPS for?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1: www.holhol24.internet
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Select the proper numbers separated through commas and/or areas, or go away enter
clean to make a choice all choices proven (Enter 'c' to cancel): 1

Wait for the SSL set up to finish. You will now have the ability to get admission to the web content with HTTPS.

Note: If you get admission to the web content now, you’ll get a 403 forbidden error since you are but to put the Joomla installer filer.

Redirect non-www HTTP requests to www HTTPS with Nginx (not obligatory)

You would possibly love to configure the Nginx server to redirect the site visitors from the non-www HTTP web site to the WWW HTTPS web site, I.e., http://holhol24.internet >> https://www.holhol24.internet. You can skip this if you don’t use www on your area.

Auto-Renew SSL Certificate

The Certbot consumer now contains auto-renewal of SSL certificate throughout the systemd. So, you’ll now not need to renew the certificate manually.

Install Joomla with Nginx

Create Database for Joomla Installation

First, login into MariaDB/MySQL database server.

sudo mysql -u root -p

Then, create the database for Joomla set up at the side of the database person and password.

CREATE DATABASE joomladb;

CREATE USER 'joomlauser'@'localhost' IDENTIFIED BY 'password';

GRANT ALL PRIVILEGES ON joomladb.* TO 'joomlauser'@'localhost';

EXIT

Download Joomla Package

Download the newest model of the Joomla package deal the use of the next command within the terminal.

mkdir /tmp/joomla && cd /tmp/joomla

wget https://downloads.joomla.org/cms/joomla4/4-0-3/Joomla_4-0-3-Stable-Full_Package.tar.gz?structure=gz -O Joomla_4-0-3-Stable-Full_Package.tar.gz

Then, extract the downloaded report.

tar -zxvf Joomla_4-0-3-Stable-Full_Package.tar.gz

And then, transfer the information for your web content file root listing.

sudo mv * /usr/proportion/nginx/www.holhol24.internet/html/

Update the possession and a gaggle of the Joomla web site listing.

sudo chown -R www-data:www-data /usr/proportion/nginx/www.holhol24.internet/

Install Joomla CMS

Open your browser and talk over with your Joomla web content area to accomplish the Joomla set up.

https://your-joomla-website

1. Select Language for the installer and sort the Site Name in your Joomla web content after which click on Setup Login Data

2. Enter Joomla Administrator title, username, password, and e-mail cope with, after which click on Setup Data  Connection

3. Select the database sort as MySQL (PDO) after which input Joomla database main points [Leave the table prefix and Connection Encryption as it is] after which click on Install Joomla

4. You will now get Congratulations! Your Joomla web site is able. You can get admission to the web content through clicking on Complete & Open Site or Joomla back-end through clicking on Complete & Open Admin. If you need, you’ll be able to additionally upload further language in your web content’s front-end and back-end through clicking on Install Additional Languages.

5. You can get admission to the Joomla back-end any time through going to https://your-joomla-website/administrator

Access Joomla Website

Now, it is possible for you to to get admission to the web site together with your area title.

https://your-joomla-website

Joomla Website
Joomla Website

Conclusion

That’s All. I’m hoping you’ve realized the way to set up Joomla with Nginx on Debian 11.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More