Multiple Sites on One Cert; Can't Connect to one of the Sites

My first post here, so I apologize if this isn’t in the correct place. I will try to describe my issue with as much detail as possible.

I have two websites running on a Linode: and

Both are using the same LetsEncrypt certificate. I can access perfectly, no issues whatsoever, no matter where I am., however is not the case. When I am not on wifi I get messages saying that it cannot connect to the server (Safari) or this message in Chrome:

This site can't provide a secure connection sent an invalid response.

I ran both domains through SSL Labs:

This one above works fine, gets an A rating, shows the certs, etc.

This one, however, not so much. The IPv4 seems to be okay (A rating) but the IPv6 shows the error “Unable to connect to the server”

SSL Labs says the reason is most likely firewall rules. I checked my firewall settings and they seem “normal” but I would also think that if it was an issue with the firewall, then BOTH websites would have a problem.

I checked my DNS settings (which are on Hostgator) and they seem fine. I added an AAAA record on Hostgator to add the IPv6 returned by SSL Labs, but that didn’t seem to help.

I also checked my nginx settings for both sites and they are exactly the same, with the appropriate domain name values being different, of course.

I’m completely stuck here; I’ve run out of options. I cannot figure out why I can access perfectly fine, anywhere I go, on wifi or not, and yet I can only access when on wifi. This is particularly frustrating for me, because the one place where I need to access the most, I can’t.

Any help/suggestions would be greatly appreciated. This is not my area of expertise so I feel like I’m flying blind a bit.

What’s the Nginx configuration?

nginx -T” will display it.

Is IPv6 enabled?

I get a “Connection refused” error when I try to connect to it.

Edit: doesn’t have an AAAA record. uses Linode’s DNS.

Do you want to see the entire output of nginx -T?

Not sure what you mean by is IPv6 enabled? Sorry to sound that naive, but is that not something that’s enabled automatically? And enabled where? On the Linode or Hostgator?

tabijidojo doesn’t have an AAAA record, but that’s not the site that has the issue. is the one with the problem.

I would prefer to. :slight_smile:

Enabled in the Nginx configuration.

If SSL Labs already found an IPv6 address, it already had an AAAA record. The problem is the IP address SSL Labs tries to connect to: apparently, there's nothing listening on that IP address.
This could be because that specific IP address is for another server al together.
Or perhaps it is your server, but it's firewalled. Or it is your server, but nginx just isn't listening on IPv6, but only on IPv4..

The nginx -T would clarify the latter, the former you could check by checking the existence of an IPv6 address (a public one) with ip -6 addr list or ifconfig

1 Like

nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

configuration file /etc/nginx/nginx.conf:

user www-data;
worker_processes auto;
pid /run/;
include /etc/nginx/modules-enabled/*.conf;

events {
worker_connections 768;
# multi_accept on;

http {

# Basic Settings

sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
# server_tokens off;

# server_names_hash_bucket_size 64;
# server_name_in_redirect off;

include /etc/nginx/mime.types;
default_type application/octet-stream;

# SSL Settings

ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
ssl_prefer_server_ciphers on;

# Logging Settings

access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;

# Gzip Settings

gzip on;
gzip_disable "msie6";

# gzip_vary on;
# gzip_proxied any;
# gzip_comp_level 6;
# gzip_buffers 16 8k;
# gzip_http_version 1.1;
# gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;

# Virtual Host Configs

include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;


#mail {

# See sample authentication script at:


# auth_http localhost/auth.php;

# pop3_capabilities “TOP” “USER”;

# imap_capabilities “IMAP4rev1” “UIDPLUS”;

server {

listen localhost:110;

protocol pop3;

proxy on;


server {

listen localhost:143;

protocol imap;

proxy on;



configuration file /etc/nginx/modules-enabled/50-mod-http-auth-pam.conf:

load_module modules/;

configuration file /etc/nginx/modules-enabled/50-mod-http-dav-ext.conf:

load_module modules/;

configuration file /etc/nginx/modules-enabled/50-mod-http-echo.conf:

load_module modules/;

configuration file /etc/nginx/modules-enabled/50-mod-http-geoip.conf:

load_module modules/;

configuration file /etc/nginx/modules-enabled/50-mod-http-image-filter.conf:

load_module modules/;

configuration file /etc/nginx/modules-enabled/50-mod-http-subs-filter.conf:

load_module modules/;

configuration file /etc/nginx/modules-enabled/50-mod-http-upstream-fair.conf:

load_module modules/;

configuration file /etc/nginx/modules-enabled/50-mod-http-xslt-filter.conf:

load_module modules/;

configuration file /etc/nginx/modules-enabled/50-mod-mail.conf:

load_module modules/;

configuration file /etc/nginx/modules-enabled/50-mod-stream.conf:

load_module modules/;

configuration file /etc/nginx/mime.types:

types {
text/html html htm shtml;
text/css css;
text/xml xml;
image/gif gif;
image/jpeg jpeg jpg;
application/javascript js;
application/atom+xml atom;
application/rss+xml rss;

text/mathml                           mml;
text/plain                            txt;
text/      jad;
text/vnd.wap.wml                      wml;
text/x-component                      htc;

image/png                             png;
image/tiff                            tif tiff;
image/vnd.wap.wbmp                    wbmp;
image/x-icon                          ico;
image/x-jng                           jng;
image/x-ms-bmp                        bmp;
image/svg+xml                         svg svgz;
image/webp                            webp;

application/font-woff                 woff;
application/java-archive              jar war ear;
application/json                      json;
application/mac-binhex40              hqx;
application/msword                    doc;
application/pdf                       pdf;
application/postscript                ps eps ai;
application/rtf                       rtf;
application/         m3u8;
application/              xls;
application/         eot;
application/         ppt;
application/vnd.wap.wmlc              wmlc;
application/  kml;
application/      kmz;
application/x-7z-compressed           7z;
application/x-cocoa                   cco;
application/x-java-archive-diff       jardiff;
application/x-java-jnlp-file          jnlp;
application/x-makeself                run;
application/x-perl                    pl pm;
application/x-pilot                   prc pdb;
application/x-rar-compressed          rar;
application/x-redhat-package-manager  rpm;
application/x-sea                     sea;
application/x-shockwave-flash         swf;
application/x-stuffit                 sit;
application/x-tcl                     tcl tk;
application/x-x509-ca-cert            der pem crt;
application/x-xpinstall               xpi;
application/xhtml+xml                 xhtml;
application/xspf+xml                  xspf;
application/zip                       zip;

application/octet-stream              bin exe dll;
application/octet-stream              deb;
application/octet-stream              dmg;
application/octet-stream              iso img;
application/octet-stream              msi msp msm;

application/vnd.openxmlformats-officedocument.wordprocessingml.document    docx;
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet          xlsx;
application/vnd.openxmlformats-officedocument.presentationml.presentation  pptx;

audio/midi                            mid midi kar;
audio/mpeg                            mp3;
audio/ogg                             ogg;
audio/x-m4a                           m4a;
audio/x-realaudio                     ra;

video/3gpp                            3gpp 3gp;
video/mp2t                            ts;
video/mp4                             mp4;
video/mpeg                            mpeg mpg;
video/quicktime                       mov;
video/webm                            webm;
video/x-flv                           flv;
video/x-m4v                           m4v;
video/x-mng                           mng;
video/x-ms-asf                        asx asf;
video/x-ms-wmv                        wmv;
video/x-msvideo                       avi;


configuration file /etc/nginx/sites-enabled/boojproject:

upstream booj {
server unix:/srv/www/socks/booj.sock fail_timeout=10s;

server {
listen 80;

return 301 https://$host$request_uri;

server {
listen 443;

ssl on;
ssl_certificate /etc/letsencrypt/live/;
ssl_certificate_key /etc/letsencrypt/live/;

location / {
proxy_pass http://booj;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
location /static {
alias /srv/www/boojproject/static/;

configuration file /etc/nginx/sites-enabled/longview:

server {

location /nginx_status {
	stub_status on;
	deny all;


configuration file /etc/nginx/sites-enabled/tabijidojo:

upstream tabijidojo {
server unix:/srv/www/socks/tabijidojo.sock fail_timeout=10s;

server {
listen 80;

return 301 https://$host$request_uri;

server {
listen 443;

ssl on;
ssl_certificate /etc/letsencrypt/live/;
ssl_certificate_key /etc/letsencrypt/live/;

location / {
proxy_pass http://tabijidojo;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
location /static {
alias /srv/www/tabijidojo/static/;

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 state UNKNOWN qlen 1000
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
3: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP qlen 1000
inet6 2600:3c03::f03c:91ff:fe56:b59/64 scope global mngtmpaddr dynamic
valid_lft 2592000sec preferred_lft 604800sec
inet6 fe80::f03c:91ff:fe56:b59/64 scope link
valid_lft forever preferred_lft forever

You should add "listen [::]:80;" and "listen [::]:443;" respectively to enable IPv6 in the necessary virtual hosts.

So it would look like this you mean?

server {
listen 80;
listen [::]: 80;
listen [::]: 443;

return 301 https://$host$request_uri;

server {
listen 443;

Partly. “listen [::]:443;” needs to be in the SSL server block where “listen 443;” is.

I’m also not sure if the syntax allows a space in “: 80;” and “: 443;” like that.

well heck, I added both of those to both nginx configs, restarted nginx, and it seems to be working!

I turned off wifi and I can now access the sites. Thank you so much. I would never have figured that out.

The true test will be when I go to the dojo next week and see if it works.


It should look like this now, correct?:

server {
listen [::]:80;

return 301 https://$host$request_uri;

server {
listen [::]:443;

Actually… That hostname didn’t have an AAAA record. Specifically, you should add those [::]: parts to the server blocks of :wink:

You (usually) shouldn’t remove the IPv4 “listen 80;” and “listen 443;”. They (usually) need both.

Hmm, didn’t know that!

Seems there’s also another option besides using two listen directives. You can also use listen [::]:80 or listen [::]:443 ssl with the following option set to off:

this parameter (0.7.42) determines (via the IPV6_V6ONLY socket option) whether an IPv6 socket listening on a wildcard address [::] will accept only IPv6 connections or both IPv6 and IPv4 connections. This parameter is turned on by default. It can only be set once on start.

Yeah, that’s also an option.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.