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

 Linux Web Hosting, DevOps, and Cloud Solutions

Category: SSL Page 1 of 2

How to install a SSL certificate







Steps to Install an SSL Certificate


Introduction to SSL Certificates

An SSL (Secure Sockets Layer) certificate is a crucial security feature for websites, ensuring encrypted communication between the browser and the server. SSL protects sensitive information like passwords, payment details, and personal data from being intercepted. Additionally, it boosts user trust by displaying a padlock icon in the browser and improves search engine rankings as search engines prioritize HTTPS-enabled websites.

Installing an SSL certificate is essential to secure your website and provide a safe experience for your users. Below are the high-level steps for installing an SSL certificate on your server.

Steps to Install an SSL Certificate

Step 1: Generate a Certificate Signing Request (CSR)

To get an SSL certificate, you first need to generate a Certificate Signing Request (CSR), which includes your website’s details:

  • Generate a Private Key:

    Use a tool like OpenSSL to create a private key:

    openssl genrsa -out private.key 2048

    Store the private key securely, as it is required during SSL installation.

    Important: Never share the private key.

  • Generate the CSR:

    Use the private key to generate a CSR:

    openssl req -new -key private.key -out csr.pem

    Provide the requested details, including:

    • Common Name (the domain name to be secured)
    • Organization Name (for business validation)
    • Country, State, and City

Step 2: Purchase or Obtain an SSL Certificate

  • Choose a Certificate Authority (CA) or hosting provider for your SSL certificate.
  • Submit the CSR to the CA for verification.
  • Validate your domain ownership through one of the following methods:
    • Email Validation: Respond to an email sent to your domain’s administrative address.
    • DNS Validation: Add a specific DNS record to your domain.
    • HTTP Validation: Upload a verification file to your website.
  • For Extended Validation (EV) or Organization Validation (OV) certificates, additional steps like verifying your business details with the CA may be required.
  • Once validated, download the issued SSL certificate and intermediate certificate bundle (CA bundle).

Step 3: Install the SSL Certificate on the Server

  • If Using a Control Panel:

    Log in to the hosting control panel (e.g., cPanel, Plesk).

    Navigate to the SSL/TLS or security settings.

    Upload the SSL certificate, CA bundle, and private key.

    Follow the instructions to install the certificate.

  • If No Control Panel:

    Log in to the server via SSH.

    Configure the web server (e.g., Apache, Nginx) to include the certificate details:

    • SSL certificate file (.crt or .pem)
    • Private key file
    • Intermediate certificate file (CA bundle)

    Restart the web server to apply the changes.

Step 4: Test the SSL Installation

  • Use online tools like SSL Labs SSL Test to verify your SSL setup.
  • Confirm that the certificate is valid and properly installed.
  • Ensure no SSL errors or warnings are displayed.

Step 5: Update Website Links

Update all internal links and references from http:// to https:// to avoid mixed content errors. Update your CMS settings (e.g., WordPress URL settings) to use HTTPS.

Step 6: Set Up HTTPS Redirects

Redirect all HTTP traffic to HTTPS by default to ensure all users access the secure version of your site.

Step 7: Monitor and Renew the SSL Certificate

  • Keep track of the certificate’s expiration date and renew it on time.
  • For free SSL certificates like Let’s Encrypt, automate the renewal process using tools like Certbot.
  • Periodically test your website’s SSL configuration for potential issues or updates.


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.

  • Best Practices for cPanel Security in 2023: Protecting Your Website and Data

    Best Practices for cPanel Security in 2023: Protecting Your Website and Data

    As the world becomes increasingly digital, the need for strong security measures to protect websites and online data has never been more pressing. For websites hosted on cPanel servers, ensuring the security of the cPanel environment is crucial to protecting both the website and the data it hosts. In 2023, the threat of cyber attacks continues to grow, making it more important than ever for website owners and system administrators to implement best practices for cPanel security. In this blog post, we’ll explore the top best practices for cPanel security in 2023, including using strong passwords, enabling two-factor authentication, keeping cPanel up-to-date with the latest security patches, using SSL certificates, and more. By implementing these best practices, website owners and system administrators can help ensure the security and integrity of their cPanel environments, and protect their websites and data from cyber threats.

    1. Use Strong Passwords

    One of the simplest and most effective ways to improve cPanel security is by using strong passwords. Weak passwords can be easily cracked by hackers, giving them access to your cPanel environment and all the websites and data hosted on it. By using strong passwords, you can help ensure that only authorized users have access to your cPanel environment, and protect your website and data from cyber threats.

    To create strong passwords, it’s important to use a mix of uppercase and lowercase letters, numbers, and symbols. Avoid using dictionary words, common phrases, or personal information like your name or birthdate, as these can be easily guessed by hackers using brute-force attacks. Instead, use a combination of random characters that are difficult to guess.

    Additionally, it’s recommended that users use a unique password for each account they have, rather than reusing the same password across multiple accounts. This can help prevent a single compromised password from giving hackers access to multiple accounts.

    For users who find it difficult to remember multiple strong passwords, password managers can be a helpful tool. Password managers generate and store strong passwords for each account, so users don’t have to remember them all. Additionally, many password managers include features like two-factor authentication and password auditing, which can further improve cPanel security.

    2. Enable Two-Factor Authentication
    Two-factor authentication (2FA) is an extra layer of security that requires users to provide two forms of authentication in order to access an account. Typically, this involves entering a username and password (the first factor), and then providing a second form of authentication, such as a security code sent to a mobile device or email (the second factor).

    By enabling 2FA in cPanel, users can add an extra layer of security to their accounts, making it more difficult for hackers to gain access to their cPanel environment, even if they have obtained the user’s password through a data breach or other means.

    To enable 2FA in cPanel, users can follow these steps:

    1. Log in to WHM panel
    2. Click on the “Two-Factor Authentication” icon under the “Security Center” section
    3. Follow the prompts to set up 2FA using one of the available methods, such as Google Authenticator or Microsoft authenticator.

    cPanel provides detailed documentation on how to enable 2FA for cPanel accounts, which can be found here: https://docs.cpanel.net/whm/security-center/two-factor-authentication-for-whm/

    By enabling 2FA, users can add an extra layer of security to their cPanel accounts, helping to protect their websites and data from unauthorized access.

    3. Keep cPanel Up-to-Date

    Keeping cPanel up-to-date with the latest security patches and fixes is essential for maintaining the security of your cPanel environment. As new vulnerabilities are discovered, cPanel releases updates that address these issues, making it more difficult for hackers to exploit these vulnerabilities to gain access to your cPanel account.

    To update cPanel, users can follow these steps:

    1. Log in to WHM (Web Host Manager)
    2. Click on the “cPanel” button under the “Account Information” section
    3. Click on the “Upgrade to Latest Version” button
    4. Follow the prompts to update cPanel to the latest version.

    It’s important to test updates before deploying them to production to ensure that they do not cause any compatibility issues or other problems that could negatively impact your website or data.

    4. Secure SSH
    SSH (Secure Shell) is a network protocol that allows users to securely connect to a remote server. In cPanel, SSH can be accessed through the Terminal feature. It’s important to secure SSH to prevent unauthorized access and protect your server from potential attacks.

    Here are some best practices for securing SSH in cPanel:

    Use strong SSH passwords: As with all passwords, it’s essential to use strong, complex passwords for SSH. Use a mix of uppercase and lowercase letters, numbers, and symbols. Avoid using easily guessable passwords such as “password” or “123456.”

    Use SSH keys: SSH keys are a more secure way to authenticate than passwords. They use public-key cryptography to authenticate users and are not vulnerable to brute-force attacks. Consider using SSH keys instead of passwords for SSH authentication.

    Change the default SSH port: By default, SSH uses port 22. Changing the default port to a non-standard port can make it harder for attackers to find your server and attempt to gain unauthorized access. Choose a high port number between 1024 and 65535.

    Disable root login: By default, the root user is allowed to log in via SSH. However, this can be a security risk as attackers often target the root user. Consider disabling root login and using a separate, non-root user for SSH access.

    5. Control access to services by IP Address

    One of the best ways to improve cPanel security is to limit access to it only to those who need it. Unauthorized access can compromise your website and put sensitive data at risk. One effective method to limit access is by using WHM’s Host Access Control interface.

    WHM’s Host Access Control interface is a front-end tool that allows you to configure the /etc/hosts.deny and /etc/hosts.allow files. These files are used by the TCP wrappers facility to restrict access to services such as cPanel, WHM, SSH, FTP, SMTP, and more.

    Using the Host Access Control interface, you can easily add or remove IP addresses or ranges that are allowed or denied access to cPanel and other services. This provides an additional layer of security for your server by preventing unauthorized access attempts from specific IP addresses.

    To access the Host Access Control interface, log in to WHM and navigate to the “Security Center” section. From there, click on “Host Access Control.” You can then configure the settings according to your needs.

    By taking advantage of WHM’s Host Access Control interface, you can ensure that only authorized users are allowed access to cPanel and other services on your server, significantly reducing the risk of unauthorized access and potential security breaches.

    You can find some examples on how to configure Host Access control on the below document
    https://docs.cpanel.net/whm/security-center/host-access-control/

    6. Use strong Firewall
    A firewall is a network security tool that monitors and controls incoming and outgoing network traffic based on predetermined security rules. It acts as a barrier between your server and the outside world, preventing unauthorized access and blocking malicious traffic. A firewall can also help mitigate the impact of DDoS attacks by filtering out unwanted traffic before it reaches your server.

    To implement a firewall on a cPanel server, you can use third-party software such as ConfigServer Security & Firewall (CSF) or Advanced Policy Firewall (APF). These firewall solutions are designed specifically for cPanel and offer an easy-to-use interface for managing firewall rules. They support a variety of configuration options and can be customized to suit your specific needs.

    Both CSF and APF do not support firewalld, so you may need to disable firewalld and install iptables before installing them. Once installed, you can configure firewall rules to limit access to specific ports and protocols, block known malicious IPs, and prevent unauthorized access to your server. You can also set up alerts to be notified when a security event occurs, such as when a blocked IP tries to access your server.

    While firewalld is a popular firewall solution for many Linux systems, csf and apf have some advantages that make them better suited for cPanel servers. Here are a few reasons why:

    Integration with cPanel: Both csf and apf are specifically designed to work with cPanel, meaning they integrate seamlessly with the control panel’s user interface and make it easier to manage firewall rules.

    User-friendly interface: Both csf and apf offer a simple, easy-to-use interface for managing firewall rules, making it easier for cPanel users with little or no experience in server administration to set up and manage their firewall.

    Advanced features: Both csf and apf offer advanced features such as connection rate limiting, port scanning detection, and real-time blocking, which can help to further improve server security.

    Community support: csf and apf have been around for many years and have active communities of users and developers, which means that they are well-supported and regularly updated with the latest security features and bug fixes.

    Overall, while firewalld is a good option for general Linux servers, csf and apf are more tailored to cPanel and offer advanced features and integration that make them better suited for cPanel servers. You should only installone of them.

    7. Enable Brute Force Protection
    Brute force attacks are a type of cyber attack in which an attacker attempts to gain access to a system by repeatedly guessing usernames and passwords until the correct combination is found. These attacks can be particularly harmful for cPanel servers, as they can potentially give attackers access to sensitive data and website files.

    To protect against brute force attacks, cPanel offers built-in brute force protection tools that can be enabled by the server administrator. These tools work by blocking IP addresses that repeatedly fail login attempts within a certain timeframe.

    To enable brute force protection in cPanel, follow these steps:

    1. Log in to WHM as the root user.
    2. Navigate to Home > Security Center > cPHulk Brute Force Protection.
    3. Click the “Enable” button to enable brute force protection.
    4. Configure the settings to suit your needs, such as the number of login attempts allowed before blocking an IP address and the duration of the block.

    It’s important to note that enabling brute force protection can sometimes result in false positives, such as when legitimate users mistype their passwords. To avoid these situations, consider adding IP addresses to a whitelist of trusted users who should not be blocked by the brute force protection tool.
    For more detailed instructions on how to enable and configure cPanel’s brute force protection tool, refer to the cPanel documentation below:
    https://docs.cpanel.net/whm/security-center/cphulk-brute-force-protection/

    8. Regularly Back Up Website and cPanel Data
    Regularly backing up website and cPanel data is crucial to ensuring the availability and integrity of your data. A backup is essentially a copy of your data that you can restore in case of data loss, corruption, or other unexpected events. Without a backup, you risk losing your data permanently, which can have serious consequences for your business or personal website.

    Creating an effective backup strategy involves several key considerations. Here are some tips:

    1. Choose a backup solution: cPanel comes with its own built-in backup solution that allows you to create full or partial backups of your cPanel account, including your website files, databases, email accounts, and settings. It’s essential to use a reliable backup solution that can handle your data size and is compatible with your hosting environment.

    2. Determine backup frequency: The backup frequency depends on the frequency of changes to your website and data. For example, if you make frequent changes to your website or store sensitive data, you may need to back up your data daily or weekly. You may also consider backing up before making significant changes to your website or software.

    3. Store backups in multiple locations: Storing backups in multiple locations is essential to ensure that you can restore your data in case of a disaster or outage. You can store backups locally on your server, but it’s also recommended to store backups remotely, such as in cloud storage or an offsite location.

    4. Automate backups: Manually creating backups can be time-consuming and error-prone, which is why it’s recommended to automate backups. You can use cPanel’s built-in backup solution to schedule backups automatically or use third-party backup solutions like JetBackup to create automated backups.

    For advanced backup options, you may consider using JetBackup, which offers features like incremental backups, remote backups, and backup retention policies. JetBackup is an excellent option for those who require more customization and configuration options than what is available with cPanel’s built-in backup system. Their FAQ is a useful resource for anyone looking to learn more about JetBackup’s features and capabilities.
    https://docs.jetbackup.com/manual/whm/FAQ/FAQ.html

    By implementing an effective backup strategy, you can ensure the availability and integrity of your data, and quickly restore your website and cPanel account in case of a disaster or data loss event.

    9. Secure Apache
    Securing Apache on cPanel is an essential step in protecting your website and data. Here are some ways to do it:

    Use ModSecurity: ModSecurity is an open-source web application firewall that can help protect your website from a wide range of attacks. It can also help block malicious traffic before it reaches your server. WHM’s ModSecurity® Vendors interface allows you to install the (OWASP) Core Rule Set (CRS), which is a set of rules designed to protect against common web application attacks.

    Use suEXEC module: suEXEC is a module that allows scripts to be executed under their own user ID instead of the default Apache user. This provides an additional layer of security by limiting the impact of a compromised script to the user’s home directory instead of the entire server.

    Implement symlink race condition protection: Symlink race condition vulnerabilities can allow attackers to gain access to files that they should not have access to. Implementing symlink race condition protection helps prevent these vulnerabilities by denying access to files and directories that have weak permissions.

    Implementing these measures can help secure Apache on cPanel and protect your website and data from potential security breaches.

    10. Disable unused services and daemons
    Disabling unused services and daemons is an important step in ensuring the security of your cPanel server. Any service or daemon that allows connections to your server may also allow hackers to gain access, so disabling them can greatly reduce the risk of a security breach.
    To disable unused services and daemons in cPanel, you can use the Service Manager interface in WHM. This interface allows you to view a list of all the services and daemons running on your server and disable the ones that you do not need.

    To access the Service Manager interface, log in to WHM and navigate to Home » Service Configuration » Service Manager. Here, you will see a list of all the services and daemons running on your server, along with their status (either Enabled or Disabled).

    To disable a service or daemon, simply click the Disable button next to its name. You can also use the checkboxes at the top of the page to select multiple services or daemons and disable them all at once.

    11. Monitor your system
    It is important to regularly monitor your server and review logs to ensure that everything is functioning as expected and to quickly identify any potential security threats. You can set up alerts and notifications to stay informed about any issues that arise.

    To effectively monitor your system, you can use various tools and software solutions. Some popular ones include:

    Tripwire: This tool monitors checksums of files and reports changes. It can be used to detect unauthorized changes to critical system files.
    Chkrootkit: This tool scans for common vulnerabilities and rootkits that can be used to gain unauthorized access to your system.
    Rkhunter: Similar to Chkrootkit, this tool scans for common vulnerabilities and rootkits, and can help detect potential security threats.
    Logwatch: This tool monitors and reports on daily system activity, including any unusual or suspicious events that may require further investigation.
    ConfigServer eXploit Scanner: This tool scans your system for potential vulnerabilities and provides detailed reports on any security issues found.
    ImunifyAV: This is a popular antivirus solution for cPanel servers, which can scan your system for malware and other security threats.
    Linux Malware Detect: This is another popular malware scanner for Linux servers, which can detect and remove malicious files.

    12. Use SSL Certificates whenever possible
    SSL certificates are digital certificates that provide secure communication between a website and its visitors by encrypting the data transmitted between them. They help protect against eavesdropping and data theft by making sure that the data being exchanged is not intercepted and read by any third party.

    To obtain and install an SSL certificate in cPanel, you can either purchase one from a trusted certificate authority or use free SSL provider. To install a certificate, you’ll need to generate a certificate signing request (CSR) and then use it to obtain the SSL certificate. Once you have the certificate, you can install it through cPanel’s SSL/TLS Manager interface.

    One way to obtain a free SSL certificate is through cPanel’s AutoSSL feature, which can automatically provision and renew SSL certificates for domains hosted on the server. Let’s Encrypt and Sectigo are two SSL providers that are supported by AutoSSL.

    Enforcing and using SSL for cPanel services, like webmail and cPanel itself, is also important for security. You can require SSL for cPanel services by enabling the “Force HTTPS Redirect” option in cPanel’s “SSL/TLS” interface. Additionally, you can use the “Require SSL” option to require SSL connections for specific cPanel services, like webmail or FTP.

    Summary
    Securing your cPanel server is crucial to protect your website and data from cyber attacks. In this blog post, we discussed some best practices for cPanel security in 2023, including:

    1. Updating cPanel and its components regularly to ensure the latest security patches.
    2. Creating strong passwords and enabling two-factor authentication.
    3. Limiting access to cPanel to only those who need it and using WHM’s Host Access Control interface to restrict access.
    3. Implementing a firewall like csf or apf to protect against cyber attacks.
    4. Enabling brute force protection and regularly backing up website and cPanel data.
    5. Securing Apache with ModSecurity and suEXEC module, and disabling unused services and daemons.
    6. Monitoring your system with various tools like Tripwire, chkrootkit, Rkhunter, Logwatch, ConfigServer eXploit Scanner, ImunifyAV, and Linux Malware Detect.
    7. Using SSL certificates to encrypt data in transit, and enforcing SSL for cPanel services using the “Require SSL” feature.

    By following these best practices, you can significantly improve the security of your cPanel server and protect your website and data from cyber threats. Remember, security is an ongoing process, so it’s essential to stay vigilant and regularly monitor your system for any vulnerabilities or suspicious activity.

    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.

  • CSR generation for UCC certificates

    Unified Communications (UC) Certificates (also called SAN Certificates) use Subject Alternative Names o secure multiple sites (e.g. fully qualified domain names) with one certificate. Four SANs are included in the base price of the UC Certificate, but you can purchase additional names at any time during the lifetime of the certificate.

    With a UC Certificate, you can secure:

    www.linuxwebhostingsupport.in
    www.example2.com
    www.example3.net
    mail.example.net
    dev.example2.com

    The CSR generation process is little different for creating an UCC certificates. We will have to create a Openssl based configuration file and then create private key and CSR from it.

    Step 1: Create a custom OpenSSL Conf file.

    The following is an example conf file that can be used for creation of a SAN/UCC cert. Save it as multissl.conf

    ———–
    [ req ]
    default_bits = 2048
    default_keyfile = privkey.pem
    distinguished_name = req_distinguished_name
    req_extensions = req_ext # The extentions to add to the self signed cert

    [ req_distinguished_name ]
    countryName = Country Name (2 letter code)
    countryName_default = US
    stateOrProvinceName = State or Province Name (full name)
    stateOrProvinceName_default = Iowa
    localityName = Locality Name (eg, city)
    localityName_default = Iowa City
    organizationName = Organization Name (eg, company)
    organizationName_default = The University of Iowa
    organizationalUnitName = Organizational Unit Name (eg, section)
    organizationalUnitName_default = Domain Control Validated
    commonName = Common Name (eg, YOUR SSL domain name)
    commonName_max = 64

    [ req_ext ]
    subjectAltName = @alt_names

    [alt_names]
    DNS.1 = www.linuxwebhostingsupport.in
    DNS.2 = www.example1.com
    DNS.3 = example2.com
    ———–

    Notes:

    The alt_names section (DNS.1, DNS.2, ….) are the list of all other domain names you wish to secure with this cert. Additional can be added such as DNS.4, etc.
    The following examples assume that you name the above config file file multissl.conf (if it is named differently you must adjust the filename in the below examples accordingly.
    Step 2: Generate the Private key and CSR with OpenSSL

    Execute the following OpenSSL command

    $ openssl req -nodes -newkey rsa:2048 -keyout serverfqdn.key -out multidomain.csr -config multissl.conf

    * Replace “serverfqdn” with the fully qualified domain name of the server (ie: sample.server.uiowa.edu). Note: it may also be helpful to add a year to the filename.

    You will then see output and be prompted for configuration as seen in the following example. Enter your details accordingly.

    ——————————————
    $ openssl req -nodes -newkey rsa:2048 -keyout serverfqdn.key -out multidomain.csr -config multissl.conf
    Generating a 2048 bit RSA private key
    ………………………………….+++
    …………………………………………………………+++
    writing new private key to ‘serverfqdn.key’
    —–
    You are about to be asked to enter information that will be incorporated
    into your certificate request.
    What you are about to enter is what is called a Distinguished Name or a DN.
    There are quite a few fields but you can leave some blank
    For some fields there will be a default value,
    If you enter ‘.’, the field will be left blank.
    —–
    Country Name (2 letter code) [US]:US
    State or Province Name (full name) [Iowa]:Iowa
    Locality Name (eg, city) [Iowa City]:Iowa City
    Organization Name (eg, company) [The University of Iowa]:My Company name
    Organizational Unit Name (eg, section) [Domain Control Validated]:IT SUPPORT
    Common Name (eg, YOUR SSL domain name) []:www.linuxwebhostingsupport.in
    ——————————————

    Note: Replace www.linuxwebhostingsupport.in with the “primary” domain name you want secured with this certificate (likely, but not necessarily the hostname of the machine).

    At this point you should have the new key file, and CSR. Save the key file in a secure place, it will be needed to apply the new certificate. The CSR can now be submitted to request the SSL Cert.

    Strong TLS/SSL Security on your server

    SSL Report : www.linuxwebhostingsupport.in

    ssllab

     

     

     

     

    This is a simple guide for setting up a strong TLS/SSL configuration on your server.

    If you configure a web server’s TLS configuration, you have primarily to take care of three things:

    1. disable SSL 2.0 (FUBAR) and SSL 3.01 (POODLE),
    2. disable TLS 1.0 compression (CRIME),
    3. disable weak ciphers (DES, RC4), prefer modern ciphers (AES), modes (GCM), and protocols (TLS 1.2).

     

    Your Server’s Certificate

    Let’s start with your digital certificate, which is at the core of HTTPS. The certificate enables clients to verify the identity of servers, through a chain of trust from your server’s certificate through intermediate certificates and up to a root certificate trusted by users’ browsers. Your server certificate should be 2048 bits in length. Using 4096 bit certificate is more secure however it require more computation times and hence slow compared to 2048 bit certs.

     

    Basic HTTPS Setup

    Here are basic SSL configurations, first for Apache:

    ;
    ...
    SSLEngine on
    SSLCertificateFile /etc/ssl/certs/your_cert
    SSLCertificateChainFile /etc/ssl/certs/chained_certs
    SSLCertificateKeyFile /etc/ssl/certs/your_private_key
    <;/VirtualHost>;
    

    And then for Nginx:

    server {
    ...
    ssl on;
    ssl_certificate /etc/ssl/certs/your_cert_with_chain;
    ssl_certificate_key /etc/ssl/certs/your_private_key;
    ssl_session_cache shared:SSL:50m;
    ssl_session_timeout 10m;
    }
    

    In Nginx, the ssl_certificate parameter is confusing. It expects your certificate plus any necessary intermediate certificates, concatenated together.

    Make sure all of these files are at least mode 0444, except your private key, which should be 0400.

     

    Software versions

    On the server side you should update your OpenSSL to 1.0.1c+ so you can support TLS 1.2, GCM, and ECDHE as soon as possible. Fortunately that’s already the case in Ubuntu 12.04 and later.

    On the client side the browser vendors are starting to catch up. As of now, Chrome 30, Internet Explorer 11 on Windows 8, Safari 7 on OS X 10.9, and Firefox 26 all support TLS 1.2.

     

    Cipher Suite Configuration

    The recommended cipher suites for Apache are follows

    SSLCipherSuite EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH
    SSLHonorCipherOrder on
    

    The recommended cipher suite for backwards compatibility (IE6/WinXP):

    SSLCipherSuite EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4
    SSLHonorCipherOrder on
    

     

    And here’s the same configuration for Nginx:

    ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH';
    ssl_prefer_server_ciphers on;
    

    The recommended cipher suite for backwards compatibility (IE6/WinXP):

    ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4";
    ssl_prefer_server_ciphers on;
    

    If your version of OpenSSL is old, unavailable ciphers will be discarded automatically. Always use the full ciphersuite above and let OpenSSL pick the ones it supports.

    The ordering of a ciphersuite is very important because it decides which algorithms are going to be selected in priority. The recommendation above prioritizes algorithms that provide perfect forward secrecy.

     

    Prioritization logic

    ECDHE+AESGCM ciphers are selected first. These are TLS 1.2 ciphers and not widely supported at the moment. No known attack currently target these ciphers.
    PFS ciphersuites are preferred, with ECDHE first, then DHE.
    AES 128 is preferred to AES 256.  At the moment, AES128 is preferred, because it provides good security, is really fast, and seems to be more resistant to timing attacks.
    In the backward compatible ciphersuite, AES is preferred to 3DES. BEAST attacks on AES are mitigated in TLS 1.1 and above, and difficult to achieve in TLS 1.0. In the non-backward compatible ciphersuite, 3DES is not present.
    RC4 is removed entirely. 3DES is used for backward compatibility

     

    Protocol Support: SSL or no SSL

    To prevent downgrade attacks and poodle attack, we will also disable old SSL protocols

    For Apache:

    SSLProtocol all -SSLv2 -SSLv3
    

    For Nginx:

    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    

    This disables all versions of SSL, enabling only TLS 1.0 and up. All versions of Chrome and Firefox support at least TLS 1.0.

    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

     

    Page 1 of 2

    Powered by WordPress & Theme by Anders Norén