Empowering you with the knowledge to master Linux web hosting, DevOps and Cloud

 Linux Web Hosting, DevOps, and Cloud Solutions

Tag: ssl

Install the free SSL Certificate on the server’s hostname – cPanel WHM server


cPanel and WHM (WebHost Manager) is a popular web hosting control panels that allow server administrators to manage web hosting services efficiently. Among their many features, cPanel offers a handy tool called AutoSSL, which provides free SSL certificates for added security. In this guide, I will show you how to use AutoSSL to secure your server’s hostname.

Step 1: The checkallsslcerts Script

The checkallsslcerts Script is used by cPanel to issue SSL certificates for server hostname. It’s important to note that checkallsslcerts
runs as part of the nightly update checks performed on your system. These updates include cPanel’s own update script, upcp (cPanel update script).

Step 2: When to Manually Run AutoSSL

In most cases, checkallsslcerts will take care of securing your server’s hostname during the nightly updates. However, there may be instances when you want to update the SSL certificate manually. This is especially useful if you’ve recently changed your server’s hostname and want to ensure the SSL certificate is updated immediately.

Step 3: Understanding the checkallsslcerts Script

The `/usr/local/cpanel/bin/checkallsslcerts` script is responsible for checking and installing SSL certificates for your server’s hostname. Here’s what the script does:

– It creates a Domain Control Validation (DCV) file.
– It performs a DNS lookup for your hostname’s IP address.
– It checks the DCV file using HTTP validation (for cPanel & WHM servers).
– If needed, it sends a request to Sectigo to issue a new SSL certificate.
– It logs the Sectigo requests for validation.

You can learn more about the checkallsslcerts script and it’s usage in this article from cPanel:

Step 4: How to Manually Execute the Script

To manually run the script, use the following command:

/usr/local/cpanel/bin/checkallsslcerts [options]

You can use options like `–allow-retry` and `–verbose` as needed.

Step 5: Troubleshooting and Tips

If you encounter issues with the SSL certificate installation, the script will provide helpful output to troubleshoot the problem. Ensure that your server’s firewall allows access from Sectigo’s IP addresses mentioned in the guide.

Common Issue: Unable to obtain a free hostname certificate due to 404 when DCV check runs in /usr/local/cpanel/bin/checkallsslcerts

After running the /usr/local/cpanel/bin/checkallsslcerts script via SSH, you may see errors similar to the following:

FAILED: Cpanel::Exception/(XID bj6m2k) The system queried for a temporary file at “http://hostname.domain.tld/.well-known/pki-validation/B65E7F11E8FBB1F598817B68746BCDDC.txt”, but the web server responded with the following error: 404 (Not Found). A DNS (Domain Name System) or web server misconfiguration may exist.
[WARN] The system failed to acquire a signed certificate from the cPanel Store because of the following error: Neither HTTP nor DNS DCV preflight checks succeeded!

Description:
Encountering errors like “404 Not Found” during the DCV check when running /usr/local/cpanel/bin/checkallsslcerts via SSH? This issue typically arises when the shared IP address doesn’t match the main IP. To resolve it, ensure both IPs match and that the A record for the server’s hostname points to the main/shared IP. Here’s a workaround:

Workaround:

1. Confirm that the main IP and shared IP are identical.
2. Make sure the A record for the server’s hostname points to the main/shared IP.
3. To change the shared IP:
Log in to WHM as the ‘root’ user.

  • Navigate to “Home » Server Configuration » Basic WebHost Manager® Setup.”
  • Update “The IPv4 address (only one address) to use to set up shared IPv4 virtual hosts” to match the main IP.
  • Click “Save Changes” and then execute the following via SSH or Terminal in WHM:
    /scripts/rebuildhttpdconf
    /scripts/restartsrv_httpd --hard

    This will help resolve issues with obtaining a free hostname certificate in cPanel/WHM.

    Conclusion

    Securing your cPanel/WHM server’s hostname with a free SSL certificate from AutoSSL is essential for a secure web hosting environment. By following these steps, you can ensure that your server’s hostname is protected with a valid SSL certificate.

    Remember to regularly check your SSL certificates to ensure they remain up-to-date and secure.

  • How to Install nopCommerce on Ubuntu Linux with Nginx Reverse Proxy and SSL: Step-by-Step Guide

    nopCommerce is an open-source e-commerce platform that allows users to create and manage their online stores. It is built on the ASP.NET Core framework and supports multiple database systems, including MySQL, Microsoft SQL Server, and PostgreSQL as it’s backend. The platform is highly customizable and offers a wide range of features, including product management, order processing, shipping, payment integration, and customer management. nopCommerce is a popular choice for businesses of all sizes because of its flexibility, scalability, and user-friendly interface.
    In this tutorial, we will guide you through the process of installing nopCommerce on Ubuntu Linux with Nginx reverse proxy and SSL.

    Register Microsoft key and feed
    To register the Microsoft key and feed, launch the terminal and execute these commands:

    1. Download the packages-microsoft-prod.deb file by running the command:

    wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb

    2. Install the packages-microsoft-prod.deb package by running the command:

    sudo dpkg -i packages-microsoft-prod.deb

    Install the .NET Core Runtime
    To install the .NET Core Runtime, perform the following steps:

    1. Update the available product listings for installation by running the command:

    sudo apt-get update

    2. Install the .NET runtime by running the command:

    sudo apt-get install -y apt-transport-https aspnetcore-runtime-7.0

    To determine the appropriate version of the .NET runtime to install, you should refer to the documentation provided by nopCommerce, which takes into account both the version of nopCommerce you are using and the Ubuntu OS version. Refer to the link below:

    https://learn.microsoft.com/en-us/dotnet/core/install/linux-ubuntu
    https://learn.microsoft.com/en-us/dotnet/core/install/linux-ubuntu#supported-distributions

    3. Verify the installed .Net Core runtimes by running the command:

    dotnet --list-runtimes


    4. Install the libgdiplus library:

    sudo apt-get install libgdiplus

    libgdiplus is an open-source implementation of the GDI+ API that provides access to graphic-related functions in nopCommerce and is required for running nopCommerce on Linux.

    Install MySql Server
    Latest nopCommerce support latest MySQL and MariaDB versions. We will install the latest MariaDB 10.6.

    1. To install mariadb-server for nopCommerce, execute the following command in the terminal:

    sudo apt-get install mariadb-server

    2. After installing MariaDB Server, you need to set the root password. Execute the following command in the terminal to set the root password:

    sudo /usr/bin/mysql_secure_installation

    This will start a prompt to guide you through the process of securing your MySQL installation and setting the root password.

    3. Create a database and User. We will use these details while installing nopCommerce. Replace the names of the database and the database user accordingly.

    mysql -u root -p
    create database  nopCommerceDB;
    grant all on nopCommerceDB.* to nopCommerceuser@localhost identified by 'P@ssW0rD';

    Please replace the database name, username and password accordingly.

    4. Reload privilege tables and exit the database.

    flush privileges;
    quit;

    Install nginx

    1. To install Nginx, run the following command:

    sudo apt-get install nginx

    2. After installing Nginx, start the service by running:

    sudo systemctl start nginx

    3. You can verify the status of the service using the following command:

    sudo systemctl status nginx


    4. Nginx Reverse proxy configuration
    To configure Nginx as a reverse proxy for your nopCommerce application, you’ll need to modify the default Nginx configuration file located at /etc/nginx/sites-available/nopcommerce.linuxwebhostingsupport.in. Open the file in a text editor and replace its contents with the following:

    server {
    
        server_name nopcommerce.linuxwebhostingsupport.in;
    
    	listen 80;
        listen [::]:80;
    
    
      location / {
        proxy_pass         http://localhost:5000;
        proxy_http_version 1.1;
        proxy_set_header   Upgrade $http_upgrade;
        proxy_set_header   Connection keep-alive;
        proxy_set_header   Host $host;
        proxy_cache_bypass $http_upgrade;
        proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header   X-Forwarded-Proto $scheme;
        }
    
    }
    

    You need to replace nopcommerce.linuxwebhostingsupport.in with your domain name
    5. Enable the virtual host configuration file:
    Enable the server block by creating a symbolic link in the /etc/nginx/sites-enabled directory:
    sudo ln -s /etc/nginx/sites-available/nopcommerce.linuxwebhostingsupport.in /etc/nginx/sites-enabled/

    6. Reload Nginx for the changes to take effect:

    sudo systemctl reload Nginx

    Install NopCommerce

    In this example, we’ll use /var/www/nopCommerce for storing the files.

    1. Create a directory:

    sudo mkdir /var/www/nopCommerce

    2. Navigate to the directory where you want to store the nopCommerce files, Download and unpack nopCommerce:

    cd /var/www/nopCommerce
    sudo wget https://github.com/nopSolutions/nopCommerce/releases/download/release-4.60.2/nopCommerce_4.60.2_NoSource_linux_x64.zip
    sudo apt-get install unzip
    sudo unzip nopCommerce_4.60.2_NoSource_linux_x64.zip

    3. Create two directories that nopCommerce needs to run properly:

    sudo mkdir bin
    sudo mkdir logs

    4. Change the ownership of the nopCommerce directory and its contents to the www-data group:

    sudo chown -R www-data.www-data  /var/www/nopCommerce/

    www-data is the user Nginx webserver runs.

    Create the nopCommerce service

    1. Create a file named nopCommerce.service in the /etc/systemd/system directory with the following content:

    [Unit]
    Description=Example nopCommerce app running on Xubuntu
    
    [Service]
    WorkingDirectory=/var/www/nopCommerce
    ExecStart=/usr/bin/dotnet /var/www/nopCommerce/Nop.Web.dll
    Restart=always
    # Restart service after 10 seconds if the dotnet service crashes:
    RestartSec=10
    KillSignal=SIGINT
    SyslogIdentifier=nopCommerce-example
    User=www-data
    Environment=ASPNETCORE_ENVIRONMENT=Production
    Environment=DOTNET_PRINT_TELEMETRY_MESSAGE=false
    
    [Install]
    WantedBy=multi-user.target

    2. Start the nopCommerce service by running:

    sudo systemctl start nopCommerce.service

    3. To check the status of the nopCommerce service, use the following command:

    sudo systemctl status nopCommerce.service

    Also, check if the service is running on port 5000

    sudo lsof -i:5000

    4. After that, restart the nginx server:

    sudo systemctl restart nginx

    Now that the prerequisites are installed and configured, you can proceed to install and set up your nopCommerce store.

    Install nopCommerce
    After completing the previous steps, you can access the website through the following URL: http://nopcommerce.linuxwebhostingsupport.in. Upon visiting the site for the first time, you will be automatically redirected to the installation page as shown below:

    Provide the following information in the Store Information panel:

  • Admin user email: This is the email address of the first administrator for the website.
  • Admin user password: You must create a password for the administrator account.
  • Confirm password: Confirm the admin user password.
  • Country: Choose your country from the dropdown list. By selecting a country, you can configure your store with preinstalled language packs, preconfigured settings, shipping details, VAT settings, currencies, measures, and more.
  • Create sample data: Check this box if you want sample products to be created. It is recommended so that you can start working with your website before adding your own products. You can always delete or unpublish these items later.

    In the Database Information panel, you will need to provide the following details:

  • Database: Select either Microsoft SQL Server, MySQL, or PostgreSQL. Since, we are installing nopCommerce on Linux and MariaDB, choose the MySQL.
  • Create database if it doesn’t exist: We recommend creating your database and database user ahead of time to ensure a successful installation. Simply create a database instance and add the database user to it. The installation process will create all the tables, stored procedures, and more. Uncheck this option since we can use the database and database user we created earlier.
  • Enter raw connection string (advanced): Select this option if you prefer to enter a Connection string instead of filling the connection fields. For now, leave this unchecked
  • Server name: This is the IP, URL, or server name of your database. Use “localhost”.
  • Database name: This is the name of the database used by nopCommerce. Use the database we created earlier.
  • Use integrated Windows authentication: Leave it unchecked
  • SQL Username: Enter your database user name we created earlier.
  • SQL Password: Use your database user password we used earlier.
  • Specify custom collation: Leave this advanced setting empty.

    Click on the Install button to initiate the installation process. Once the installation is complete, the home page of your new site will be displayed. Access your site from the following URL: http://nopcommerce.linuxwebhostingsupport.in.


    Note:
    You can reset a nopCommerce website to its default settings by deleting the appsettings.json file located in the App_Data folder.

    Adding and Securing the nopCommerce
    We will be using Let’s Encrypt to add free and secure SSL certificate.
    Let’s Encrypt is a free, automated, and open certificate authority that allows you to obtain SSL/TLS certificates for your website. Certbot is a command-line tool that automates the process of obtaining and renewing these certificates, making it easier to secure your website with HTTPS.

    Here are the steps to install SSL with Certbot Nginx plugins:

    1.Install Certbot: First, make sure you have Certbot installed on your server. You can do this by running the following command:

    sudo apt-get update
    sudo apt-get install certbot python3-certbot-nginx

    2. Obtain SSL Certificate: Next, you need to obtain an SSL certificate for your domain. You can do this by running the following command:
    sudo certbot –nginx -d yourdomain.com

    Replace yourdomain.com with your own domain name. This command will automatically configure Nginx to use SSL, obtain a Let’s Encrypt SSL certificate and set an automatic redirect from http to https.

    3.Verify SSL Certificate: Once the certificate is installed, you can verify it by visiting your website using the https protocol. If the SSL certificate is valid, you should see a padlock icon in your browser’s address bar.

    4. Automatic Renewal: Certbot SSL certificates are valid for 90 days. To automatically renew your SSL certificate before it expires, you can set up a cron job to run the following command:

    sudo certbot renew --quiet

    This will check if your SSL certificate is due for renewal and automatically renew it if necessary.

    5. nopCommerce also recommend turning “UseProxy setting to true in the appsettings.json file located in the App_Data folder if we are using SSL. So change this value too.


    nopCommerce is a popular open-source e-commerce platform that offers users a flexible and scalable solution for creating and managing online stores. In this tutorial, we provided a step-by-step guide for installing and configuring nopCommerce on Ubuntu Linux with Nginx reverse proxy and SSL. We covered the installation of Microsoft key and feed, .NET Core Runtime, MySQL server, and Nginx reverse proxy. We also discussed how to configure Nginx as a reverse proxy for the nopCommerce application. By following this tutorial, you can set up a secure and reliable nopCommerce e-commerce store on Ubuntu Linux.

  • SSL Certificates: What They Are and Why Your Website Needs Them

    Introduction

    In today’s digital age, website security is more important than ever. One of the key components of website security is SSL (Secure Sockets Layer). SSL is a protocol for establishing secure, encrypted connections between a web server and a web browser. SSL (Secure Socket Layer) has historically been the standard encryption protocol for secure communication over the internet. However, it has been replaced by TLS (Transport Layer Security) as the standard encryption protocol. Despite this, SSL is still commonly used as a general term to refer to both SSL and TLS. In this article, we’ll explore what SSL is, why it’s important for website security, and how it works.

    Definition of SSL
    SSL is a security protocol that uses encryption to protect data transmitted between a web server and a web browser. SSL ensures that any data transmitted between the two parties is kept confidential, authenticated, and secure from unauthorized access. SSL is often used to secure online transactions, such as e-commerce purchases, online banking, and other sensitive data transmissions.

    Importance of SSL in website security
    Without SSL, data transmitted between a web server and a web browser is sent in plain text, which can be intercepted and read by hackers. SSL helps to prevent this by encrypting the data so that it cannot be intercepted or read. SSL also provides authentication, which ensures that the website being accessed is the genuine website and not a fake website designed to steal data. In addition, SSL provides integrity, which ensures that the data being transmitted has not been tampered with during transmission.
    SSL helps prevent man-in-the-middle attacks, where an attacker intercepts the data being transmitted and alters it without the knowledge of the sender or receiver.

    How SSL Works

    Explanation of SSL handshake
    When a web browser establishes a connection with a web server using SSL, a process called the SSL handshake occurs. During the SSL handshake, the web browser and web server exchange information and establish a secure, encrypted connection. The SSL handshake consists of the following steps:

    1. The web browser sends a “hello” message to the web server, along with the SSL version number and the list of encryption algorithms that the browser supports.
    2. The web server responds with a “hello” message, along with the SSL version number and the encryption algorithm that will be used for the connection.
    3. The web server sends its SSL certificate to the web browser, which contains the public key needed to encrypt data sent to the server.
    4. The web browser verifies the SSL certificate and sends a message to the web server to begin encrypting data.
    5. The web server responds with a message indicating that it is ready to begin encrypting data.

    SSL encryption and decryption process
    Once the SSL handshake is complete and the secure connection has been established, all data transmitted between the web browser and the web server is encrypted. The data is encrypted using the encryption algorithm negotiated during the SSL handshake. When the encrypted data reaches the web server, it is decrypted using the private key associated with the SSL certificate.

    Role of SSL certificates in SSL
    SSL certificates are an essential component of SSL. SSL certificates are digital certificates that are used to verify the identity of a website and establish a secure, encrypted connection. SSL certificates contain information about the website, such as the domain name, the owner of the website, and the expiration date of the certificate. SSL certificates are issued by trusted third-party certificate authorities (CA) and must be installed on the web server.

    In order to obtain an SSL certificate, the website owner must generate a Certificate Signing Request (CSR), which contains information about the website and the public key that will be used for encryption. The CSR is then submitted to a trusted third-party CA, who will verify the website’s identity before issuing the SSL certificate.

    Types of SSL Certificates

    SSL certificates come in different types, each with different validation requirements and levels of assurance. Here are the most common types:

    1. Domain Validated (DV) SSL Certificates
    Domain Validated (DV) SSL certificates are the most basic type of SSL certificate. They verify that the domain name is registered and under the control of the certificate applicant. DV certificates are easy to obtain and are usually issued within minutes of submitting a certificate signing request (CSR).

    To get a DV SSL certificate, you simply need to prove that you own the domain name by responding to an email or uploading a file to your website. DV certificates only provide basic encryption and do not display any company information in the certificate details.

    2. Organization Validated (OV) SSL Certificates
    Organization Validated (OV) SSL certificates offer a higher level of assurance than DV certificates. In addition to validating the domain ownership, OV certificates also verify that the organization applying for the certificate is legitimate and registered to do business.

    To obtain an OV SSL certificate, the applicant must provide additional information about their organization, such as business registration documents and legal information. OV certificates display the company name in the certificate details, which can help to build trust with website visitors.

    3. Extended Validation (EV) SSL Certificates
    Extended Validation (EV) SSL certificates are the highest level of SSL certificate and offer the strongest level of assurance. They provide the most visible sign of trust with a green address bar and the company name displayed in the certificate details.

    To obtain an EV SSL certificate, the applicant must go through a rigorous validation process that includes verifying the legal, physical, and operational existence of the organization. This process can take several days to complete, but the result is a certificate that provides the highest level of assurance and trust.

    EV certificates are typically used by high-profile websites such as banks, e-commerce sites, and government agencies that handle sensitive information.

    Besides the standard SSL certificates, some Certificate Authorities (CA’s) also offer Wildcard SSL certificates. These can be used to secure multiple subdomains with a single certificate.

    The Process of Getting an SSL Certificate

    SSL certificates are issued by a trusted third-party called a Certificate Authority (CA). Getting an SSL certificate involves several steps, including choosing a CA, generating a Certificate Signing Request (CSR), and validating the SSL certificate.

    Choosing a Certificate Authority (CA)
    There are many CAs that offer SSL certificates, including popular options such as Let’s Encrypt, Comodo, DigiCert, and Symantec. When choosing a CA, consider factors such as the level of customer support, pricing, and the types of certificates they offer.

    Generating a Certificate Signing Request (CSR)
    A CSR is a file that contains information about your website and is used to apply for an SSL certificate. To generate a CSR, you will need to have access to your web server and use a tool such as OpenSSL to create the file.

    When generating a Certificate Signing Request (CSR), you will need to provide the following information:

  • Common Name (CN): This is the domain name that you want to secure with SSL. For example, www.example.com.
  • Organization (O): The legal name of your organization.
  • Organizational Unit (OU): This is the department within your organization that is responsible for the certificate.
  • City/Locality (L): The city where your organization is located.
  • State/Province (ST): The state or province where your organization is located.
  • Country (C): The two-letter country code where your organization is located.
  • Email Address: An email address where the Certificate Authority (CA) can contact you if needed.

    Make sure to double-check your entries for accuracy as any errors may result in delays in obtaining your SSL certificate.

    Here’s how to generate a CSR using OpenSSL:

    1. Open a command prompt or terminal app.
    2. Run the following command to generate a private key: openssl genrsa -out private.key 2048
    3. Run the following command to generate a CSR: openssl req -new -key private.key -out mydomain.csr
    4. Follow the prompts to enter the required information, such as your website’s domain name, location, and contact information.

    Alternatively, you can use an online CSR generator tools from Namecheap or DigiCert, to generate a CSR.
    https://decoder.link/csr_generator
    https://www.digicert.com/easy-csr/openssl.htm?rid=011592

    It’s important to keep your private key safe and secure because it is required during the installation of your SSL certificate. If your private key is lost or compromised, your SSL certificate will no longer be valid and you will need to generate a new CSR and request a new SSL certificate.

    Validation of the SSL certificate
    Once you have generated a CSR, you will need to submit the CSR to the Certificate Authority (CA). CA will then needs to verify the SSL request. So, you will need to validate your domain ownership to obtain the SSL certificate. The type of validation required will depend on the type of SSL certificate you have chosen.

    a. Domain Validated (DV) SSL Certificates
    For DV SSL certificates, the CA will only validate that you own the domain for which you are requesting the certificate. There are three methods of domain validation that are commonly used:

  • Email Validation: The CA will send an email to a predefined email address associated with the domain, such as admin@yourdomain.com, and ask you to click on a link or reply with a code to confirm ownership.

  • DNS Validation: The CA will ask you to add a specific DNS record to your domain’s DNS settings. This proves that you have control over the domain’s DNS.

  • HTTP File Upload: The CA will ask you to upload a specific file to your website’s root directory. This proves that you have control over the domain and the website associated with it.

    b. Organization Validated (OV) SSL Certificates
    For OV SSL certificates, the CA will perform additional checks to validate the organization’s legal identity, including:

  • Checking the organization’s business registration documents
  • Checking the organization’s physical address and phone number
  • Verifying the organization’s name and the name of the person requesting the certificate

    c. Extended Validation (EV) SSL Certificates
    For EV SSL certificates, the CA will perform the most rigorous checks to validate the organization’s legal identity, including:

  • Checking the organization’s legal existence and business’s government registration documents
  • Checking the organization’s physical address and phone number
  • Verifying the organization’s name and the name of the person requesting the certificate
  • Conducting a thorough background check on the organization’s reputation and business practices

    Once the validation process is complete and the CA will issue the SSL certificate and then the certificate can be installed on the web server.

    In addition to purchasing SSL certificates from a CA, some web hosting providers offer free SSL certificates through Let’s Encrypt, a nonprofit CA that provides free SSL certificates to promote web security. This can be an affordable option for website owners who want to ensure their website is secure. You can also install certbot tools and obtain free SSL certificates from Let’s Encrypt if you have a root or SSH access to your server.

    Installing an SSL Certificate on Your Server
    The specific steps for installing an SSL certificate may vary depending on your server or service. Be sure to follow the instructions provided by your certificate authority or web server documentation.

    When you receive an SSL certificate for your domain, the Certificate Authority (CA) typically provides a zip file that contains the following files:

    SSL certificate: This is the primary certificate that contains your domain name, public key, expiration date, and other details. The certificate may be in different formats, such as .pem, .crt, or .cer.
    Intermediate certificate(s): These certificates form the chain of trust between the SSL certificate and the root certificate of the CA. They are required for SSL validation and may be included in the SSL certificate itself or provided as separate files.
    Root certificate: This certificate is at the top of the certificate chain and is used to establish trust. It may or may not be included in the SSL certificate.zip file.

    The correct order of installation would be:
    Domain certificate
    Intermediate certificate
    Root certificate

    Note that some SSL/TLS certificate providers may bundle the intermediate and root certificates together in a single file. If this is the case, you only need to install the bundled certificate and the domain certificate.

    You can find detailed instructions on how to install an SSL certificate on Nginx and Apache by following the links provided.

    How to install an SSL certificate on Ubuntu for Nginx

    How to install SSL with Apache on Ubuntu

    SSL and Website Security

    SSL or Secure Socket Layer is a widely used technology to encrypt the data being transmitted between a web server and a web browser. It provides a secure connection and helps protect against cyber attacks like phishing, data theft, and man-in-the-middle attacks. In this section, we will explore how SSL helps protect against cyber attacks and some best practices for SSL implementation to enhance website security.

    How SSL helps protect against cyber attacks:

    Data Encryption: SSL encrypts the data being transmitted between the server and the browser, ensuring that the information is protected and cannot be intercepted by third-party attackers.

    Authentication: SSL certificates provide authentication to the website, ensuring that the user is connecting to the correct website and not a malicious imposter.

    Trustworthiness: SSL certificates are issued by trusted third-party Certificate Authorities (CA), which helps establish the trustworthiness of the website.

    SSL best practices for website security:

    Use strong encryption algorithms: Always use the latest and most secure encryption algorithms, such as AES 256-bit encryption, to encrypt the data being transmitted.

    Keep SSL certificates up-to-date: Regularly update SSL certificates to ensure that they are not expired or revoked.

    Implement HTTPS: Always use HTTPS instead of HTTP to secure your website. HTTPS is a protocol that encrypts the data being transmitted over the internet and provides a secure connection.

    Common SSL vulnerabilities and how to avoid them:

    Weak Encryption: Always use strong encryption algorithms and keep them updated to avoid weak encryption.

    Insecure Certificates: Ensure that SSL certificates are issued by trusted third-party Certificate Authorities (CA) to avoid insecure certificates.

    Expired Certificates: Regularly update SSL certificates to avoid expired certificates, which can lead to vulnerabilities and cyber attacks.

    Conclusion

    In summary, SSL is an essential technology for ensuring secure communication between a website and its visitors. It uses a combination of encryption, authentication, and trust mechanisms to protect against eavesdropping, tampering, and phishing attacks. With the increasing reliance on online services and the growing sophistication of cyber threats, it is more important than ever to secure your website with SSL.

    To get started with SSL, you need to choose a certificate authority, generate a CSR, and complete the validation process. Once you have obtained your SSL certificate, you can install it on your server following the instructions provided by your web server software or hosting provider. Remember to keep your private key secure and regularly renew your SSL certificate to maintain the highest level of security.

    By using SSL, you can not only safeguard your visitors’ data and privacy, but also enhance your website’s reputation, trustworthiness, and search engine visibility. SSL is not just a best practice, but a necessity for any website that wants to thrive in the digital age. So, don’t wait any longer, get your SSL certificate today and start reaping the benefits of a secure website!

  • How to install Redmine on Ubuntu 22.04 with Apache and SSL


    How to install Redmine on Ubuntu 22.04

    Introduction
    Redmine is a powerful and versatile project management tool that can help teams stay organized, collaborate effectively, and track progress towards their goals. Originally developed for the Ruby on Rails community, Redmine is now used by thousands of organizations worldwide, from small startups to large enterprises.

    With Redmine, you can create projects and sub-projects, define tasks and issues, assign them to team members, set due dates and priorities, and track time spent on each task. You can also add comments and attachments to issues, create custom fields and workflows, and generate reports and graphs to visualize project status and progress.

    It is open-source software written in Ruby on Rails and is available under the GNU General Public License.

    Whether you’re a software development team, a marketing agency, a non-profit organization, or any other type of group that needs to manage projects and tasks, Redmine can be a valuable tool to help you stay on track, collaborate effectively, and achieve your goals. In this blog, we’ll explore some of the key features and use cases of Redmine, and provide tips and best practices for getting the most out of this powerful project management tool.

    In this tutorial, we will go through the steps of installing Redmine on an Ubuntu 22.04 server and secure it Let’s Encrypt SSL.

    Prerequisites:

    Ubuntu 22.04 Server
    Root or sudo user access
    A domain name pointed to the server is required for accessing Redmine via a web browser.

    Step 1: Update Ubuntu System
    The first step is to update the Ubuntu system to ensure that all the packages are up-to-date. You can do this by running the following command:
    sudo apt update
    Step 2: Install Dependencies
    Redmine requires several dependencies to be installed before it can be installed. To install them, run the following command:

    sudo apt install -y build-essential libmagickwand-dev libxml2-dev libxslt1-dev libffi-dev libyaml-dev zlib1g-dev libssl-dev git imagemagick libcurl4-openssl-dev libtool libxslt-dev ruby ruby-dev rubygems libgdbm-dev libncurses-dev

    Also, install Apache and Apache mod Passenger module
    sudo apt install -y apache2 libapache2-mod-passenger

    Note: libapache2-mod-passenger is a module for the Apache web server that enables the deployment of Ruby on Rails web applications. It provides an easy way to configure and manage Ruby on Rails applications within an Apache web server environment.

    Step 3: Create a Redmine User
    Create a dedicated Linux user for running Redmine:
    useradd -r -m -d /opt/redmine -s /usr/bin/bash redmine

    Add the user to the www-data group to enable Apache to access Redmine files:
    usermod -aG redmine www-data

    Step 4: Install and Secure MariaDB
    MariaDB is a popular open-source database management system and is used as the backend for Redmine. To install and secure MariaDB, run the following commands:
    sudo apt install -y mariadb-server

    Enable and run the database service.

    systemctl enable --now mariadb
    mysql_secure_installation

    Note: mysql_secure_installation is used to secure the installation by performing a series of security-related tasks, such as:

  • Setting a root password for the MySQL or MariaDB server.
  • Removing the anonymous user accounts, which are accounts without a username or password.
  • Disabling remote root logins, which can be a security vulnerability.
  • Removing the test database, which is a sample database that is not needed for most production environments.
  • Reloading the privilege tables to ensure that the changes take effect.

    Create a database and User. Replace the names of the database and the database user accordingly.

    mysql -u root -p
    create database redminedb;
    grant all on redminedb.* to redmineuser@localhost identified by 'P@ssW0rD';

    Reload privilege tables and exit the database.

    flush privileges;
    quit

    Step 5: Download and Extract Redmine
    Download the latest version of Redmine and extract it to the /opt/redmine directory using the following command:

    curl -s https://www.redmine.org/releases/redmine-5.0.5.tar.gz | sudo -u redmine tar xz -C /opt/redmine/ --strip-components=1

    Create Redmine configuration file by renaming the sample configuration files as shown below;

    su - redmine
    cp /opt/redmine/config/configuration.yml{.example,}
    cp /opt/redmine/public/dispatch.fcgi{.example,}
    cp /opt/redmine/config/database.yml{.example,}

    The sample configuration files are provided by Redmine as a starting point for configuring your installation.

    Step 6: Configure the Database
    Modify the config/database.yml file and update database name, username, and password for the production environment:

    nano /opt/redmine/config/database.yml
    In the file, replace the default configuration with the following:

    production:
      adapter: mysql2
      database: redminedb
      host: localhost
      username: redmineuser
      password: "P@ssW0rD"
      encoding: utf8mb4
    

    Since the configuration file is an yaml, you need to use proper Indentation.

    Save and close the file.

    Step 7: Install Bundler and Redmine Dependencies
    Install Bundler for managing gem dependencies and run the following commands:

    sudo gem install bundler

    Login as redmine user and execute below commands:

    su - redmine
    bundle config set --local without 'development test'
    bundle install
    bundle update
    exit

    Step 8: Configure File System Permissions
    Ensure that the following directories are available in the Redmine directory (/opt/redmine):

    tmp and tmp/pdf
    public and public/plugin_assets
    log
    files

    Create them if they don’t exist and ensure that they are owned by the user used to run Redmine:

    for i in tmp tmp/pdf public/plugin_assets; do [ -d $i ] || mkdir -p $i; done
    chown -R redmine:redmine files log tmp public/plugin_assets
    chmod -R 755 /opt/redmine

    Step 9: Configure Apache
    Create a new Apache virtual host file for Redmine:
    sudo nano /etc/apache2/sites-available/redmine.conf

    Paste the following configuration into the file:

    <VirtualHost *:80>
        ServerName redmine.linuxwebhostingsupport.in
        DocumentRoot /opt/redmine/public
        ErrorLog ${APACHE_LOG_DIR}/redmine-error.log
        CustomLog ${APACHE_LOG_DIR}/redmine-access.log combined
        <Directory /opt/redmine/public>
            Require all granted
            Options -MultiViews
            PassengerEnabled on
            PassengerAppEnv production
            PassengerRuby /usr/bin/ruby
        </Directory>
    </VirtualHost>
    

    Save the file and exit the text editor. Replace redmine.linuxwebhostingsupport.in with your domain name.

    Enable the Redmine site by running the following command:

    sudo a2ensite redmine.conf

    Restart Apache to apply the changes:

    sudo systemctl restart apache2

    Allow Apache through the Ubuntu UFW firewall:

    sudo ufw allow 'Apache Full'

    Install Certbot and the Apache plugin for Let’s Encrypt:

    sudo apt install certbot python3-certbot-apache

    Adding Lets Encrypt SSL certificate

    You need to make sure your domain is properly pointed to the server IP, otherwise, Let’s encrypt will fail.

    Obtain an SSL certificate for your domain by running the following command:

    sudo certbot --apache

    Follow the on-screen instructions to complete the process.

    Restart Apache to apply the SSL configuration:

    sudo systemctl restart apache2

    Open your web browser and go to https://redmine.linuxwebhostingsupport.in/. You should see the Redmine home screen.

    Login to the admin area using your Redmine admin username and password. If this is your first login, you will need to reset your admin password.

    https://redmine.linuxwebhostingsupport.in/login

    Congratulations! You have successfully installed and configured Redmine on your Ubuntu server. In the previous steps, we have covered the installation and configuration of Redmine, including setting up the database, configuring Apache, and securing Redmine with Let’s Encrypt SSL.


    However, one critical aspect of Redmine that you might want to configure is email delivery for notifications. This feature is essential for keeping team members informed about project updates, new issues, and changes to existing issues. In this section, we will show you how to configure email delivery in Redmine.

    Configuring SMTP for Email Delivery in Redmine

    Redmine supports email delivery for notifications, which you can set up using the following steps:

    Step 1 – Open Configuration File

    First, you need to open the configuration.yml file in a text editor:

    sudo nano /opt/redmine/config/configuration.yml

    Step 2 – Configure Email Settings

    Next, scroll down to the production section of the file, uncomment the following lines by removing the # symbol at the beginning of each line, and replace the values with your SMTP server’s settings:

    # specific configuration options for production environment
    # that overrides the default ones
    production:
      email_delivery:
        delivery_method: :smtp
        smtp_settings:
          address: "your.smtp.server.com"
          port: 587
          domain: "your.domain.com"
          authentication: :login
          user_name: "your_email@example.com"
          password: "your_email_password"
          enable_starttls_auto: true
    # specific configuration options for development environment
    # that overrides the default ones
    

    Replace the values for address, port, domain, user_name, and password with your SMTP server’s settings:

    address: The address of your SMTP server.
    port: The port number to use for SMTP server (usually 587).
    domain: The domain name of your organization or server.
    user_name: The email address of the user account to use for sending emails.
    password: The password for the user account to use for sending emails.
    Save the configuration.yml file.

    Since the configuration file is an yaml, you need to use proper Indentation.

    Step 3 – Restart Apache

    Finally, restart Apache to apply the changes:

    sudo systemctl restart apache2
    And that’s it! Redmine is now configured to deliver email notifications to your team members.

    Conclusion

    Redmine is a powerful project management tool that can help you manage your software development projects effectively. In this blog post, we have covered the installation and configuration of Redmine on Ubuntu, including setting up the database, configuring Apache, securing Redmine with Let’s Encrypt SSL, and configuring email delivery.

    With these steps, you should now have a working Redmine installation that can help you track your projects, collaborate with your team, and stay on top of your development process. Good luck!

  • How to install SSL with Apache on Ubuntu

    In today’s world of online business and communication, security is more important than ever. One essential aspect of website security is SSL (Secure Sockets Layer), a protocol that encrypts data sent between a web server and a user’s web browser. By using SSL, website owners can protect their users’ personal information from being intercepted or stolen by hackers.

    In this tutorial, we’ll walk you through the steps to install and secure your website with SSL on Ubuntu 22.04 using Apache2. By the end of this guide, you’ll have a secure, encrypted connection between your web server and your users’ browsers, helping to ensure their safety and privacy.

    Section 1: Installing Apache2 on Ubuntu 22.04

    Apache2 is a popular open-source web server software that plays a crucial role in hosting websites on the internet. In this section, we will walk through the process of installing Apache2 on Ubuntu 22.04.

    Step 1: Update the Package List
    Before installing any new software, it’s always a good idea to update the package list to ensure you are installing the latest version of the software. To update the package list, open the terminal on Ubuntu 22.04 and run the following command:

    sudo apt update

    Step 2: Install Apache2
    Once the package list is updated, you can proceed with installing Apache2 by running the following command:

    sudo apt install apache2

    This command will download and install Apache2 along with all its dependencies. During the installation process, you will be prompted to confirm the installation by typing y and pressing Enter.

    Enable and Start the Apache2 service

    sudo systemctl enable apache2
    sudo systemctl start  apache2

    Step 3: Verify Apache2 Installation
    To test if Apache2 is working correctly, open a web browser and enter your server’s IP address or domain name in the address bar. You should see the default Apache2 web page.

    I hope that helps! Let me know if you have any questions or suggestions for the blog post.
    If Apache2 is installed correctly, you should see a page that says “Apache2 Ubuntu Default Page”.

    Congratulations, you have successfully installed Apache2 on Ubuntu 22.04! In the next section, we will proceed with securing the web server by enabling SSL.

    If you encounter any issues like Connection timeout or Unable to reach the website during the verification process, one possible cause could be that the Ubuntu firewall is blocking Apache2 traffic.

    To check if Apache2 is currently enabled in the firewall, you can use the following command:

    sudo ufw status

    If the output shows that the firewall is active and Apache2 is not listed as an allowed service, you can add it by running the following command:

    sudo ufw allow 'Apache Full'

    This will allow both HTTP (port 80) and HTTPS (port 443) traffic to pass through the firewall, ensuring that your website is accessible to visitors.

    Section 2: Installing SSL Certificate on Ubuntu 22.04 with Apache2

    There are different types of SSL certificates, including domain validated, organization validated, and extended validation certificates. Each type has different features and provides varying levels of trust and security.

    To install an SSL certificate on Ubuntu 22.04 with Apache2, you’ll need to follow these steps:

  • Obtain an SSL certificate: You can purchase an SSL certificate from a certificate authority (CA) or obtain a free SSL certificate from Let’s Encrypt. If you already have an SSL certificate, make sure it is valid and up-to-date.
  • Configure Apache2 to use the SSL certificate: Apache2 needs to be configured to use the SSL certificate for secure communication. This involves creating a virtual host for the SSL-enabled website, specifying the SSL certificate and key files, and enabling SSL encryption.

    You can read more about different SSL certificate types, the process to create a Certificate signing request(CSR), etc in the below blog post:

    SSL Certificates: What They Are and Why Your Website Needs Them

    Here are the steps for creating and configuring virtual hosts for Apache on Ubuntu 22.04:

    1. Create a new virtual host configuration file:

    sudo nano /etc/apache2/sites-available/linuxwebhostingsupport.in.conf

    Add the following configuration to the file, replacing linuxwebhostingsupport.in with your own domain name:

    <VirtualHost *:80>
        ServerAdmin admin@linuxwebhostingsupport.in
        ServerName linuxwebhostingsupport.in
    	ServerAlias www.linuxwebhostingsupport.in
        DocumentRoot /var/www/html/linuxwebhostingsupport.in/html
    
        <Directory /var/www/html/linuxwebhostingsupport.in/html>
            Options Indexes FollowSymLinks
            AllowOverride All
            Require all granted
        </Directory>
    
        ErrorLog ${APACHE_LOG_DIR}/linuxwebhostingsupport.in_error.log
        CustomLog ${APACHE_LOG_DIR}/linuxwebhostingsupport.in_access.log combined
    </VirtualHost>
    
    <VirtualHost *:443>
        ServerAdmin admin@linuxwebhostingsupport.in
        ServerName linuxwebhostingsupport.in
    	ServerAlias www.linuxwebhostingsupport.in
        DocumentRoot /var/www/html/linuxwebhostingsupport.in/html
    
        SSLEngine on
        SSLCertificateFile /etc/ssl/certs/linuxwebhostingsupport.in.crt
        SSLCertificateKeyFile /etc/ssl/private/linuxwebhostingsupport.in.key
        SSLCertificateChainFile /etc/ssl/certs/linuxwebhostingsupport.in_cabundle.crt
    
        <Directory /var/www/html/linuxwebhostingsupport.in/html>
            Options Indexes FollowSymLinks
            AllowOverride All
            Require all granted
        </Directory>
    
        ErrorLog ${APACHE_LOG_DIR}/linuxwebhostingsupport.in_error.log
        CustomLog ${APACHE_LOG_DIR}/linuxwebhostingsupport.in_access.log combined
    </VirtualHost>
    

    Note: replace the paths to SSL certificate files with your own paths.

    2. Enable the virtual host configuration file:

    sudo a2ensite linuxwebhostingsupport.in.conf

    3. Create the documentroot
    Run the following command to create the directory:

    sudo mkdir -p /var/www/html/linuxwebhostingsupport.in/html

    4. Create an HTML file named index.html in the new directory by running the following command:

    sudo nano /var/www/html/linuxwebhostingsupport.in/html/index.html

    This will open a text editor. Add the following code to the file:

    <html>
        <head>
            <title>Hello, world!</title>
        </head>
        <body>
            <h1>Hello, world!</h1>
            <p>Welcome to my website!</p>
        </body>
    </html>
    

    5. Reload Apache for the changes to take effect:

    sudo systemctl reload apache2

    Section 3: Testing SSL on Ubuntu 22.04 with Apache2

    Test your SSL configuration by visiting your domain in a web browser and verifying that the SSL certificate is valid and the website loads correctly over HTTPS. The browser should display a padlock icon and the connection should be secure

    You can also use the online tools like https://www.sslshopper.com/ssl-checker.html to check the configuration further. It can show if there any issues with certificate chain or trust.

    Section 4. Troubleshooting SSL on Ubuntu 22.04 with Apache2

    1. Certificate errors: If you encounter a certificate error, such as a warning that the certificate is not trusted or has expired, check the certificate’s validity and ensure it’s installed correctly. You can check the certificate’s details using your web browser, and make sure it matches the domain name and other relevant details.

    2. Mixed content warnings: If you see mixed content warnings, which indicate that some parts of the site are not secure, check for any resources that are still being loaded over HTTP instead of HTTPS. This can include images, scripts, and other files.

    3. SSL handshake errors: If you see an SSL handshake error, this usually means there’s an issue with the SSL configuration. Check your Apache configuration files and make sure the SSL directives are properly set up. You can also check for any issues with the SSL certificate, such as an invalid or mismatched domain name.

    4. Server configuration errors: If the SSL certificate is working properly, but the site is still not loading over HTTPS, check your server configuration files to make sure the VirtualHost configuration is correct. Make sure the correct SSL certificate and key files are specified and that the SSL directives are set up correctly.

    5. Browser-specific issues: If you’re only experiencing SSL issues in a specific web browser, make sure the browser is up to date and try clearing the cache and cookies. You can also try disabling any browser extensions that may be interfering with the SSL connection.

    Remember, troubleshooting SSL issues can be complex and may require some technical expertise. If you’re not comfortable with these steps or need additional help, it’s always a good idea to consult with a professional. You can contact me at admin @ linuxwebhostingsupport.in

    Section 5: Best Practices for SSL Configuration on Ubuntu 22.04 with Apache2

    Here are some tips and best practices for configuring SSL on Ubuntu 22.04 with Apache2:

    1. Keep SSL certificates up to date: Make sure to renew your SSL certificates before they expire. This can be done through the certificate authority where you purchased the certificate. Keeping your SSL certificates up to date will ensure that your website visitors are not presented with security warnings or errors.

    2. Configure Apache2 for HTTPS-only access: Configure your web server to only serve HTTPS traffic. This can be done by redirecting all HTTP traffic to HTTPS. To do this, add the following lines to your Apache virtual host configuration or. htaccess file:

    RewriteEngine On
    RewriteCond %{HTTPS} !=on
    RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]

    3. Use secure ciphers and protocols: Use secure ciphers and protocols to protect the confidentiality and integrity of your website traffic. Disable weak ciphers and protocols such as SSLv2 and SSLv3. Use TLSv1.2 or higher, and prefer the use of forward secrecy. You can configure this in your Apache virtual host configuration file by adding the following lines:

    SSLProtocol -SSLv2 -SSLv3 -TLSv1 -TLSv1.1 +TLSv1.2
    SSLCipherSuite EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH
    SSLHonorCipherOrder on

    You can find more detailed instruction on making your SSL configuration strong and best practices in the below post:

    Strong TLS/SSL Security on your server

    By following these best practices, you can ensure that your SSL configuration is secure and up to date.

    Section 6. Summary

    In this tutorial, we discussed how to install and configure SSL certificates on Ubuntu 22.04 with Apache2. We covered the different types of SSL certificates, the steps for obtaining and installing an SSL certificate, and how to configure Apache2 to use the SSL certificate. We also discussed how to create virtual hosts for both SSL and non-SSL sites and how to troubleshoot SSL issues.

    It’s important to emphasize the importance of SSL for website security and user trust. SSL encryption helps protect sensitive information, such as passwords and credit card numbers, from being intercepted by attackers. Additionally, having a valid SSL certificate gives users confidence that they are interacting with a legitimate website and not an imposter.

    To follow best practices for SSL configuration, it’s recommended to keep SSL certificates up to date, configure Apache2 for HTTPS-only access, and use secure ciphers and protocols. By following these best practices, website owners can help ensure the security and trustworthiness of their website.

  • URL Monitoring With Nagios

    Capabilities

    Nagios provides complete URL monitoring of HTTP and HTTPS servers and protocols as well as full URL transaction monitoring.

    Benefits

    Implementing effective URL monitoring with Nagios offers the following benefits:
    * Increased server, services, and application availability
    * Fast detection of network outages and protocol failures
    * Monitor user experience when accessing URLs
    * Web server performance monitoring
    * Web transaction monitoring
    * URL monitoring

    URL monitoring

    By using the ‘check_http’ nagios command, we can monitor a specific url rather than checking the Apache service is up or not. This method is helpful to identify if the website is hacked and url is injected with malicious codes or there is some Apache or php errors and page is throwing an error instead. The normal Apache service check will return successful results in the above case.
    We can check for a specific keyword string on the webpage. If that string not present, an error will be returned.

    Here is an real example

    define service{
        use                            urlmonitoring-service
        host_name                      server.linuxwebhostingsupport.in
        service_description            url_check
        check_command                  check_http!-H linuxwebhostingsupport.in -t 30 -R "Cpanel and WHM" -f follow
    }
    
    

    The above will check for the keyword “Cpanel and WHM” on the page “linuxwebhostingsupport.in”. If the keyword is missing or the page is not responding nagios will retun and error.

    URL monitoring +SSL

    You can refer to below example if the web page has SSL/TLS enabled.

    define service{
        use                            urlmonitoring-service
        host_name                      server.linuxwebhostingsupport.in
        service_description            url_check
        check_command                  check_http!-H linuxwebhostingsupport.in -t 30 -R "Cpanel and WHM" -f follow --ssl
    }
    

    Here we added the option “–ssl” to the check command

    URL monitoring on ht password protected page

    Normal method will not work as we need to validate ht password protection first to see the page. You can use the following example for such pages.

    define service{
        use                            urlmonitoring-service
        host_name                      server.linuxwebhostingsupport.in
        service_description            url_check_protected
        check_command                  check_http!-H linuxwebhostingsupport.in -a user:password -t 30 -R "Cpanel and WHM" -f follow --ssl 
    }
    
    

    Replace the username and password appropriately.

    Apache: Multiple SSL websites on a single IP address

    Apache: Multiple SSL websites on a single IP address

    Update: This is a new update from a cPanel Tech
    “There is nothing to enable. As long as you are using cPanel & WHM version 11.38 on CentOS, RHEL, or CloudLinux version 6 or newer, SNI works out of the box”.

    One of the frustrating limitations in supporting secure websites has been the inability to share IP addresses among SSL websites.
    When website administrators and IT personnel are restricted to use a single SSL Certificate per socket (combination of IP Address and socket) it can cost a lot of money. Well we can actually share IP addresses for multiple secure websites. Solving this limitation required an extension to the Transport Layer Security (TLS) protocol that includes the addition of what hostname a client is connecting to when a handshake is initiated with a web server. The name of the extension is Server Name Indication (SNI). SNI is supported in Apache v2.2.12 , and OpenSSL v0.9.8j or later.

    With SNI, you can have many virtual hosts sharing the same IP address and port, and each one can have its own unique certificate

    Prerequisites to use SNI

    Use OpenSSL 0.9.8f or later
    Build OpenSSL with the TLS Extensions option enabled (option enable-tlsext; OpenSSL 0.9.8k and later has this enabled by default).
    Apache must have been built with that OpenSSL (./configure –with-ssl=/path/to/your/openssl). In that case, mod_ssl will automatically detect the availability of the TLS extensions and support SNI.
    Apache must use that OpenSSL at run-time, which might require setting LD_LIBRARY_PATH or equivalent to point to that OpenSSL, maybe in bin/envvars. (You’ll get unresolved symbol errors at Apache startup if Apache was built with SNI but isn’t finding the right openssl libraries at run-time.)

    Setting up SNI with Apache

    The configuration is pretty simple and straight forward, though I recommend making a backup of your existing httpd.conf file before proceeding.

    # Ensure that Apache listens on port 443
    Listen 443
    
    # Listen for virtual host requests on all IP addresses
    NameVirtualHost *:443
    
    # Go ahead and accept connections for these vhosts
    # from non-SNI clients
    SSLStrictSNIVHostCheck off
    
    # Because this virtual host is defined first, it will
    # be used as the default if the hostname is not received
    # in the SSL handshake, e.g. if the browser doesn't support
    # SNI.
    DocumentRoot /www/example2
    ServerName www.linuxwebhostingsupport.in
    
    # Other directives here
    SSLEngine On
    SSLCertificateFile /path/to/linuxwebhostingsupport.in.crt
    SSLCertificateKeyFile /path/to/linuxwebhostingsupport.in.key
    SSLCertificateChainFile /path/to/CA.crt
    
    DocumentRoot /www/example2
    ServerName www.abdulwahabmp.co.in
    
    # Other directives here
    SSLEngine On
    SSLCertificateFile /path/to/abdulwahabmp.co.in.crt
    SSLCertificateKeyFile /path/to/abdulwahabmp.co.in.key
    SSLCertificateChainFile /path/to/CA.crt

     

    That it!!!. Just restart APache service. Now go and check your Websites using https. That should be working.

    Plesk support SNI from 10.2.x version onwards.

    SNI will work on following Operating systems out of box

    OpenSuSE Linux 11.3 or later.
    Ubuntu Linux 10.4 or later.
    Debian Linux 6.0 or later.
    RedHat Linux 6.0 or later.
    CentOS Linux 60.0 or later

    Supported Desktop Browsers
    Internet Explorer 7 and later
    Firefox 2 and later
    Opera 8 with TLS 1.1 enabled
    Google Chrome:
    Supported on Windows XP on Chrome 6 and later
    Supported on Vista and later by default
    OS X 10.5.7 in Chrome Version 5.0.342.0 and later
    Chromium 11.0.696.28 and later
    Safari 2.1 and later (requires OS X 10.5.6 and later or Windows Vista and later).
    Note: No versions of Internet Explorer on Windows XP support SNI

     

    Powered by WordPress & Theme by Anders Norén