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.

Hello,
I turned on IPv6 on my droplet and followed a couple DigitalOcean docs and was able to get a second site running from the same droplet. So, I have one site running with SSL using the IPv4 address and another site with SSL as well (different certificates) using the IPv6 address shown on the droplet’s control panel.
I want to host one more site using another IPv6 address on the same droplet. I followed the instructions on https://www.digitalocean.com/docs/networking/ipv6/how-to/configure-additional-addresses/#enable-new-addresses-on-boot and setup a second address. I can check using ip -6 addr show eth0 and see my second address there. If I go on a web browser and go directly to that IP I can see the Nginx splash screen.
After that I tried to do another gunicorn socket and service and tested it, it works.
Then I created another Nginx config under /etc/nginx/sites-available/ (config file below) and linked it to /etc/nginx/sites-enabled/.
I setup my domain to point to the second IPv6 address with my domain registrar and on DigitalOcean.
So, in theory (following what I did for the first IPv6 site) everything should work, but when I go to the second domain/IPv6 address on my web browser I still just get the Nginx splash screen. I personally think it is something wrong with how I setup the Nginx config for both IPv6 sites but after a lot of Googleing I have no idea what is wrong.
Nginx config for FIRST IPv6 site (SSL enabled):
server {
server_name [Pv6:address:1] exampleSite1.com www.exampleSite1.com;
location = /favicon.ico { access_log off; log_not_found off; }
location /static/ {
root /path/to/FIRST/site;
}
location / {
include proxy_params;
proxy_pass http://unix:/run/exampleSite1.sock;
}
listen [::]:443 ssl ipv6only=on; # managed by Certbot
ssl_certificate /path/to/site/fullchain.pem; # managed by Certbot
ssl_certificate_key /path/to/site/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
server {
if ($host = www.exampleSite1.com) {
return 301 https://$host$request_uri;
} # managed by Certbot
if ($host = exampleSite1.com) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen [::]:80;
server_name [Pv6:address:1] exampleSite1.com www.exampleSite1.com;
return 404; # managed by Certbot
}
Nginx config for SECOND IPv6 site (can’t run certbot):
server {
server_name [Pv6:address:2] exampleSite2.com www.exampleSite2.com;
location = /favicon.ico { access_log off; log_not_found off; }
location /static/ {
root /path/to/SECOND/site;
}
location / {
include proxy_params;
proxy_pass http://unix:/run/exampleSite2.sock;
}
}
I hope this all helps. If any more information is needed please let me know.
WildcatMedia
jeffs
0621335d663b4b699a60eb27e28153
accesstrax
Dwight Trumbower
admin
yimprogramming
samunyi90
1d6ce141ab5444dfb1ea2dd29cf4b1
Matt Fricker
joel9b158e40551b15093f213f