How to Install Joomla with Apache and Let’s Encrypt SSL on Debian 11
Joomla! is a well-liked Content Management gadget (CMS) that involves thoughts when you find yourself in search of a substitute for WordPress. With Joomla, you’ll create blogs, dialogue boards, and different web pages.
It is loose, open-source, and works neatly on nearly any internet internet hosting carrier, making it one of the most best to put in and use.
If you wouldn’t have any internet internet hosting but, you’ll set up Joomla for your native Debian gadget or VPS.
Here, we can see methods to set up Joomla with Apache and Let’s Encrypt SSL on Debian 11.
Prerequisites
Install LAMP Stack
Follow the beneath hyperlink to put in the LAMP stack for your Debian gadget for Joomla set up.
Install AMP (Apache, 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 transient listing, most allowed measurement for uploaded information to paintings accurately. So, upload the beneath values in /and many others/php/7.4/apache2/php.ini
report. You might building up or lower values as according to your necessities.
output_buffering = off # Required for Joomla
upload_tmp_dir = “/tmp”
upload_max_filesize = 64M
post_max_size = 64M
sudo sed -i 's/output_buffering = .*/output_buffering = off/' /and many others/php/7.4/apache2/php.ini sudo sed -i 's/;upload_tmp_dir =/upload_tmp_dir = "/tmp"/' /and many others/php/7.4/apache2/php.ini sudo sed -i 's/post_max_size = .*/post_max_size = 64M/' /and many others/php/7.4/apache2/php.ini sudo sed -i 's/upload_max_filesize = .*/upload_max_filesize = 64M/' /and many others/php/7.4/apache2/php.ini
Setup Apache Virtual Host for Joomla
We will get started with making a digital host for a Joomla set up. You can in finding all Apache’s digital host information underneath /and many others/apache2/sites-available/
listing.
Typically the digital host report accommodates a ServerName, ServerAlias, Port quantity, Document root, log location, and many others.
For this text, I’m assuming the next:
Domain identify: www.holhol24.internet
Port No: 80
Document root: /var/www/html/www.holhol24.internet/
First, create a digital host report.
sudo nano /and many others/apache2/sites-available/www.holhol24.internet.conf
Then, upload the next content material into the above configuration report. Change the values as according to your requirement.
ServerName holhol24.internet ServerAlias www.holhol24.internet ServerAdmin admin@holhol24.internet DocumentRoot /var/www/html/www.holhol24.internet ErrorLog ${APACHE_LOG_DIR}/www.holhol24.net_error.log CustomLog ${APACHE_LOG_DIR}/www.holhol24.net_access.log blended /var/www/html/www.holhol24.internet> Options FollowSymlinks AllowOverride All Require all granted
Create a listing to put Joomla information.
sudo mkdir -p /var/www/html/www.holhol24.internet/
Enable the Joomla web page and Apache modules (SSL and rewrite).
sudo a2ensite www.holhol24.internet sudo a2enmod rewrite ssl
Restart the Apache carrier.
sudo systemctl restart apache2
Install Let’s Encrypt SSL Certificate
Create DNS Record
Go in your area registrar and create a DNS document [A and CNAME (optional if you do not want to use www subdomain)] document to your area.
- Non-www Domain Name (Ex. holhol24.internet) >> A document level in your server IP
- www Domain Name (Ex. www.holhol24.internet) >> CNAME document level to holhol24.internet
For this demo, I created two data in order that my Joomla web content will likely be available at www.holhol24.internet.
Install Certbot shopper
The Certbot shopper, which is helping to generate and set up the SSL certificates, is now obtainable as a snap bundle for Debian working gadget. So, first, it is important to set up snapd for your gadget.
sudo apt replace sudo apt set up -y snapd
After the set up, replace snapd to the most recent model.
sudo snap set up core && sudo snap refresh core
Finally, set up the Certbot the usage 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 at the Apache webserver.
sudo certbot --apache
1. Enter e-mail deal with to obtain notification on pressing renewal and safety notices
2. Type Y and press Enter to check in with the ACME server
3. Type Y or N to obtain emails about EFF information, campaigns, e-newsletter.
4. Certbot will routinely come across the web content(s) you created and ask you to turn on HTTPS for it. Type 1 or suitable numbers separated by means of a comma when you have more than one web pages.
Which names do you want to turn on HTTPS for?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1: holhol24.internet
2. www.holhol24.internet
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Select the precise numbers separated by means of commas and/or areas, or go away enter
clean to choose all choices proven (Enter 'c' to cancel): 1,2
Wait for the SSL set up to finish.
Redirect non-www HTTP requests to www HTTPS with Apache
The Certbot shopper will position the desired redirect laws to redirect the site visitors from HTTP to the HTTPS web content.
1. http://holhol24.internet >> https://holhol24.internet
2. http://www.holhol24.internet >> https://www.holhol24.internet
As you’ll see, with laws positioned by means of Certbot, the primary area isn’t achieving the www HTTPS web content. So, you’ll have to upload a rule manually to redirect site visitors from non-www HTTP to www HTTPS area, I.e., http://holhol24.internet >> https://www.holhol24.internet if required.
Auto-Renew SSL Certificate
The Certbot shopper features a systemd carrier and it looks after automatic certificates renewals. So, you’re going to no longer must renew the certificate manually.
Install Joomla with Apache
Create Database for Joomla Installation
First, login into MariaDB/MySQL database server.
sudo mysql -u root -p
Then, create a database for Joomla set up with 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 bundle the usage 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 to the web content root listing.
sudo mv * /var/www/html/www.holhol24.internet/
Update the possession and a bunch of the Joomla web content listing.
sudo chown -R www-data:www-data /var/www/html/www.holhol24.internet/
Install Joomla CMS
Open your browser and talk over with your web content to accomplish the Joomla set up.
https://your-joomla-website
1. Select Language for the installer and sort the Site Name to your Joomla web content after which click on Setup Login Data
2. Enter Joomla Administrator identify, username, password, and e-mail deal 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 page is in a position. You can get entry to the web content by means of clicking on Complete & Open Site or Joomla back-end by means of clicking on Complete & Open Admin. If you wish to have, you’ll additionally upload further language in your web content’s front-end and back-end by means of clicking on Install Additional Languages.
5. You can get entry to the Joomla back-end any time by means of going to https://your-joomla-website/administrator
Access Joomla Website
Now, it is possible for you to to get entry to the web page along with your area identify.
https://your-joomla-website
Screenshot of Joomla back-end:
Conclusion
That’s All. I am hoping you might have realized methods to set up Joomla with Apache and Let’s Encrypt SSL on Debian 11.