Connected Tutorial(This question is a follow-up to this tutorial):
How To Create a Self-Signed SSL Certificate for Apache in Ubuntu 22.04sudo rm /var/www/html/index.html sudo nano /var/www/html/index.html <h1>Conexion SSL</h1>
sudo apt-get install openssl sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/ssl/private/apache-selfsigned.key -out /etc/ssl/certs/apache-selfsigned.crt
sudo cp /etc/apache2/sites-available/default-ssl.conf /etc/apache2/sites-available/default-ssl.conf.bak sudo nano /etc/apache2/sites-available/default-ssl.conf + ServerAdmin xgabina001@admin.admin + ServerName 34.105.232.127 + SSLCertificateFile /etc/ssl/certs/apache-selfsigned.crt + SSLCertificateKeyFile /etc/ssl/private/apache-selfsigned.key sudo nano /etc/apache2/sites-available/000-default.conf + Redirect permanent “/” “https://34.105.232.127/”
sudo a2enmod ssl sudo a2enmod headers sudo a2ensite default-ssl sudo apache2ctl configtest sudo systemctl restart apache2
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi there,
If you’re hosting on App Platform, you don’t need to manually configure an SSL certificate, App Platform automatically provides and renews free TLS certificates through Let’s Encrypt.
If you’re setting this up on a Droplet instead, the steps you listed for Apache and OpenSSL look fine for a self-signed certificate. Just keep in mind that browsers will still show a warning since it’s not issued by a trusted CA.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.