Logo
  • Ubuntu
  • CentOS
  • Debian
  • Fedora
  • RedHat

How to Install Apache on Debian 11 - DesignLinux

Nov 10 2022
designlinux 0 Comments
 install-apache-on-debian-11

Apache is a free and open-source and cross-platform web server that powers a large number of websites. Apache web server is the most widely-used http server in the world. It includes many powerful features, dynamically loadable modules with other popular software. You will learn how to install Apache web server on Debian 11.

Install Apache on Debian 11#

By default, Debian software repositories includes the Apache so it’s very straight forward to install Apache on the Debian system.

Prerequisites#

Make sure you are logged in on your Debian 11 Bullseye with a non-root user account with full root access.

At first, you should update the package index and then will install the apache2 package using below commands :

sudo apt update
sudo apt install apache2

Here, we use sudo as command so these operations are executed with root privileges and it will prompt you to enter your regular user password to verify.

Once Apache is installed and it will start apache2 service automatically.

Adjust the Firewall#

After installation of Apache make sure that your firewall allows HTTP and HTTPS traffic. You can get list of ufw profile list by typing :

sudo ufw app list
Available applications:
    Apache
    Apache Full
    Apache Secure
    OpenSSH

You must open required ports, If you are using nftables to filter connections to your system. Issue the following commands:

nft add rule inet filter input tcp dport {80, 443} ct state new,established counter accept

Allow incoming HTTP and HTTPS traffic for this profile:

sudo ufw allow in "Apache Full"

Testing Apache Installation#

After that, Execute the below command to check the Apache status:

sudo systemctl status apache2

It will show you output like below :

● apache2.service - The Apache HTTP Server
    Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
    Active: active (running) since Sat 2019-07-27 11:29:17 UTC; 15min ago
    ...

Another method to check is, open your web browser, type your server IP address or domain name http://YOUR_SERVER_IP and you will see the default Apache welcome page as shown below:

debian-apache-defult-page

Manage Apache Processes#

Now your web server is installed and up to run so we will see some basic management commands.

To stop Apache service you can run :

sudo systemctl stop apache2

You can again start Apache service by type :

sudo systemctl start apache2

To do Restart (stop and start) the Apache service:

sudo systemctl restart apache2

If you have need to making configuration changes, Apache can reload without dropping connections. For this, use this command:

sudo systemctl reload apache2

If you want to disable the Apache service type:

sudo systemctl disable apache2

To re-enable the service to start up at boot, type:

sudo systemctl enable apache2

Conclusion#

Congratulations! You have successfully installed Apache on your Debian 11 Bullseye system. You can now start deploying your applications and use Apache as a web or proxy server.

If you have any question or suggestion, leave comment below.

Related

Tags: apache, debian

How to Install Asterisk on Ubuntu 22.04

Prev Post

How to Set or Change Timezone on Ubuntu 22.04

Next Post
Archives
  • January 2023
  • December 2022
  • November 2022
  • October 2022
  • September 2022
  • July 2022
  • June 2022
  • April 2022
  • March 2022
  • February 2022
  • January 2022
  • December 2021
  • November 2021
  • October 2021
  • September 2021
  • August 2021
  • July 2021
  • June 2021
  • May 2021
  • April 2021
  • March 2021
  • February 2021
  • January 2021
  • December 2020
  • November 2020
  • October 2020
  • September 2020
  • August 2020
  • July 2020
  • June 2020
  • May 2020
Categories
  • AlmaLinux
  • Android
  • Ansible
  • Apache
  • Arch Linux
  • AWS
  • Backups
  • Bash Shell
  • Bodhi Linux
  • CentOS
  • CentOS Stream
  • Chef
  • Cloud Software
  • CMS
  • Commandline Tools
  • Control Panels
  • CouchDB
  • Data Recovery Tools
  • Databases
  • Debian
  • Deepin Linux
  • Desktops
  • Development Tools
  • Docker
  • Download Managers
  • Drupal
  • Editors
  • Elementary OS
  • Encryption Tools
  • Fedora
  • Firewalls
  • FreeBSD
  • FTP
  • GIMP
  • Git
  • Hadoop
  • HAProxy
  • Java
  • Jenkins
  • Joomla
  • Kali Linux
  • KDE
  • Kubernetes
  • KVM
  • Laravel
  • Let's Encrypt
  • LFCA
  • Linux Certifications
  • Linux Commands
  • Linux Desktop
  • Linux Distros
  • Linux IDE
  • Linux Mint
  • Linux Talks
  • Lubuntu
  • LXC
  • Mail Server
  • Manjaro
  • MariaDB
  • MongoDB
  • Monitoring Tools
  • MySQL
  • Network
  • Networking Commands
  • NFS
  • Nginx
  • Nodejs
  • NTP
  • Open Source
  • OpenSUSE
  • Oracle Linux
  • Package Managers
  • Pentoo
  • PHP
  • Podman
  • Postfix Mail Server
  • PostgreSQL
  • Python
  • Questions
  • RedHat
  • Redis Server
  • Rocky Linux
  • Security
  • Shell Scripting
  • SQLite
  • SSH
  • Storage
  • Suse
  • Terminals
  • Text Editors
  • Top Tools
  • Torrent Clients
  • Tutorial
  • Ubuntu
  • Udemy Courses
  • Uncategorized
  • VirtualBox
  • Virtualization
  • VMware
  • VPN
  • VSCode Editor
  • Web Browsers
  • Web Design
  • Web Hosting
  • Web Servers
  • Webmin
  • Windows
  • Windows Subsystem
  • WordPress
  • Zabbix
  • Zentyal
  • Zorin OS
Visits
  • 2
  • 608
  • 1,055,380

DesignLinux.com © All rights reserved

Go to mobile version