Http-01 challenge for Ĭreated an SSL vhost at /etc/apache2/sites-available/ĭeploying Certificate to VirtualHost /etc/apache2/sites-available/Įnabling available site: /etc/apache2/sites-available/ Organization that develops Certbot? We'd like to send you email about our workĮncrypting the web, EFF news, campaigns, and ways to support digital freedom. Would you be willing to share your email address with the Electronic Frontierįoundation, a founding partner of the Let's Encrypt project and the non-profit Plugins selected: Authenticator apache, Installer apacheĮnter email address (used for urgent renewal and security notices) (Enter 'c' toĬancel): -Īgree in order to register with the ACME server at Saving debug log to /var/log/letsencrypt/letsencrypt.log Then accept Terms of Service to continue. Wizard will ask your email address to send your updates. You can add multiple domains or subdomains using separate “-d” parameters. Run the below command to request let’s encrypt certificate authority to issue certificate for our domain. This will install all the required packages for the certbot. Run the following command to install certbot binary: sudo apt install python3-certbot-apache Certbot is the command line utility to work with Let’s encrypt certificates. We use Let’s encrypt SSL certificate to secure website on Apache web server. You can test this by navigating to, Step 4 - Configure Let’s Encrypt SSL Next, Restart Apache service to apply your changes: sudo systemctl restart apache2Īpache is ready to serve your content on your configured domain name. Once done, run the below command to verify the configuration files: sudo apache2ctl configtest The above command will create a symbolic link file to sites-available directory. Use a2ensite tool to enable this virtual host: sudo a2ensite Then set correct DocumentRoot as created above.ĬustomLog $/access.log combinedīy default Apache reads virtual host configuration files under /etc/apache2/sites-available directory. You can also include ServerAlias to add more domain or subdomains. Make sure to change the proper ServerAdmin email address, Servername to your domain name. ![]() So create a new virtual host file as /etc/apache2/sites-available/: sudo nano /etc/apache2/sites-available/Īdd the following configuration to virtual host file. But this is an good habbit to create seperate configuration file for each virtual host. With the newly installed Apache server, you will see a default virtual host configuration file located at etc/apache2/sites-available/nf. Edit this file in your favorite text editor like vim or nano: nano /var/www/webroot/index.html Next, create a sample index.html page to host on this subdomain. Sudo chown -R www-data:www-data /var/www/webhost Let’s start with a directory for our domain as follows: sudo mkdir /var/www/webhost We will set up a virtual host with a sub-domain called, but you should replace this with your own domain name. A virtual host encapsulate the configuration of a domain to it. ![]() With the help of virtual hosts, you can host more than one domain from a single server. It means the Apache web server is running properly on your system. You will see the default Apache landing page. However, the best way to test web server, request a page from Apache in web browser. The result status like “Active: active (running)” means Apache service have started successfully. Loaded: loaded (/lib/systemd/system/rvice enabled vendor preset: enabled)Īctive: active (running) since Sun 05:28:08 UTC 10min agoĪpr 26 05:28:08 tecadmin systemd: Starting The Apache HTTP Server.Īpr 26 05:28:08 tecadmin systemd: Started The Apache HTTP Server. You can find the Apache service status by running the following command: sudo systemctl status apache2 ![]() Once the installation finished, Apache service will automatically start on your Ubuntu system. sudo apt updateĪfter the confirmation, apt will install Apache and other required dependencies on your system. You can easily install it using the conventional package management tool.įirst of all, update the local package index to reflect the latest upstream changes. For this tutorial, we use, which is pointed to our server.Īpache packages are available under the default software repositories on Ubunts. A domain name registered and pointed to your server’s public IP address.Complete initial server setup instructions.Running Ubuntu 20.04 system with sudo privileges shell access.This tutorial will also work on Ubuntu 18.04, Ubuntu 16.04 and Ubuntu 19.10 Linux systems. You will also learn how to secure your domain using Let’s encrypt SSL certificate. This tutorial will help you to install Apache web server on Ubuntu 20.04 LTS (Focal Fossa) operating system.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |