Score:0

create and configure SSL certificate not vaild certificate https red error

ag flag

create SSL certificate and configure apache2 server in AWS EC2 instance

  1. Create SSL using openssl

    sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/ssl/private/my-domain.key -out /etc/ssl/certs/my-domain.crt
    
  2. Configure the apache2 server

    sudo nano /etc/apache2/sites-available/my-domain.conf
    
    sudo a2ensite my-domain.conf
    
    sudo apache2ctl configtest
    
  3. Restart apache2 server

    sudo systemctl reload apache2
    
    sudo ufw allow "Apache Full"
    
    sudo nano /etc/apache2/sites-available/my-domain.conf
    

    Content of configuration file:

    <VirtualHost *:80>
        ServerName my.domain.com
        Redirect / https://my.domain.com/
    </VirtualHost>
    
    <VirtualHost *:443>
        ServerName my.domain.com
        DocumentRoot /var/www/html/index.html
    
        SSLEngine on
        SSLCertificateFile /etc/ssl/certs/my-domain.crt
        SSLCertificateKeyFile /etc/ssl/private/my-domain.key
    </VirtualHost>
    
  4. Save the file and restart the server

  5. browser url https://mydomain.com

but not vaild SSL certificate

how to fix

in flag
Self-signed certificates are generally not valid for the reason that "anybody can make them". You will probably want to look into using Let's Encrypt, which can automate a lot of this for you.
Venkatesh avatar
ag flag
yeah your correct anyone make the ssl certificate . i will go to vaild trust certificate providers thank you
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.