Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

I followed How To Set Up Apache Virtual Hosts on Ubuntu 18.04 and it is working for two domains, example1.com and example2.com.
Both of them are hosted in a DigitalOcean droplet.
I have another website on Bluehost and I’d like to host its subdomain on the DO droplet. I created a DNS record newsletter.example3.com and www.newsletter.example3.com with my DigitalOcean IP address.
I created newsletter.example3.com.conf:
<VirtualHost *:80>
ServerAdmin my.name@gmail.com
ServerName newsletter.example3.com
ServerAlias www.newsletter.example3.com
DocumentRoot /var/www/newsletter.example3.com/public_html
<Directory /var/www/newsletter.example3.com/public_html>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
<IfModule mod_dir.c>
DirectoryIndex index.php index.pl index.cgi index.html index.xhtml index.htm
</IfModule>
RewriteEngine on
RewriteCond %{SERVER_NAME} =www.newsletter.example3.com [OR]
RewriteCond %{SERVER_NAME} =newsletter.example3.com
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
I run sudo a2ensite newsletter.cecilieo.com and restarted apache.
sudo systemctl restart apache2
Problem 1: When I go to newsletter.example3.com, it shows example1.com.
Problem 2: When I run certbot, it returns errors:
sudo certbot --apache -d newsletter.cecilieo.com -d www.newsletter.example3.com
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator apache, Installer apache
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for newsletter.example3.com
http-01 challenge for www.newsletter.example3.com
Waiting for verification...
Challenge failed for domain newsletter.example3.com
Challenge failed for domain www.newsletter.example3.com
http-01 challenge for newsletter.example3.com
http-01 challenge for www.newsletter.example3.com
Cleaning up challenges
Some challenges have failed.
IMPORTANT NOTES:
- The following errors were reported by the server:
Domain: newsletter.example3.com
Type: unauthorized
Detail: Invalid response from
https://newsletter.example3.com/.well-known/acme-challenge/uMURe80sprzaxrEGzyu7F1CycxEhc-Bd-DVFAM_f09g
[2606:4700:3030::6815:2eca]: "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD
HTML 2.0//EN\">\n<html><head>\n<title>404 Not
Found</title>\n</head><body>\n<h1>Not Found</h1>\n<p"
To fix these errors, please make sure that your domain name was
entered correctly and the DNS A/AAAA record(s) for that domain
contain(s) the right IP address.
- The following errors were reported by the server:
Domain: www.newsletter.example3.com
Type: tls
Detail: Fetching
https://www.newsletter.example3.com/.well-known/acme-challenge/PbVou0UruJkHOZqWPhAOiUWTOkTw6_aMPi-6ScVxyNQ:
remote error: tls: handshake failure
To fix these errors, please make sure that your domain name was
entered correctly and the DNS A/AAAA record(s) for that domain
contain(s) the right IP address. Additionally, please check that
you have an up-to-date TLS configuration that allows the server to
communicate with the Certbot client.
Can I add a subdomain hosted by another server?
dc4230bda0b4464dbcf3a811978d84
marco
marco
Deeraj EA
billcore
Wran
cdb506d145284bffa8911de72274b5
Sean
bc2f52583874402a988f587c00195d
Dorian Bodnariuc
2bc7ff122d3448628b436c998421f9