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.

Hi,
I’ve been trying to configure my single droplet to host two different website on two different domain, where one of them is a subdomain:
I’m using Nginx and have the following config files
Main - example.com
server {
listen 443 default_server;
listen [::]:443 default_server;
root /var/www/example.com.au;
index index.html;
ssl on;
ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;
server_name example.com www.example.com;
location / { try_files $uri $uri/ =404;
}
}
server {
listen 0.0.0.0:80;
server_name example.com www.example.com;
rewrite ^ https://$host$request_uri? permanent;
}
Subdomain - blog.example.com
server {
listen 80;
listen [::]:80;
server_name blog.example.com www.blog.example.com;
return 301 https://blog.example.com$request_uri;
root /var/www/blog.example.com;
index index.php index.html index.htm;
location / {
try_files $uri $uri/ =404;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
}
location ~ /\.ht {
deny all;
}
location = /favicon.ico { log_not_found off; access_log off; }
location = /robots.txt { log_not_found off; access_log off; allow all; }
location ~* \.(css|gif|ico|jpeg|jpg|js|png)$ {
expires max;
log_not_found off;
}
The main site is working, but when I try to access the sub domain I get greeted by an error message saying that “blog.example.com’s server DNS address could not be found”.
I can Ping and nslookup the server using the subdomain address (blog.example.com) and it returns the IP-address of my server.
I suspect that I’ve done something wrong with my DNS records but I can’t figure out what that might be. I’ve set up CNAME records, A records, and Wildcard records(*.example.com) for my subdomain.
Has anybody had this problem and if so, how were you able to resolve it?
Thanks!
ebeecroft
68aa2215160846bca0a00f952c5fdc
009fd274aeae48f2bfbda6ef568676
Cloudstream Apk
032f50ee7f7d489db3b05e204fe139
032f50ee7f7d489db3b05e204fe139
Edward Sitarski
ebeecroft
dashan
34bcef38725b4e6eb5224ae028f17e