Err_cert_common_name_invalid

I’ve added tihs in default.conf and now the page is not working:

server {
    listen       443 ssl;
    server_name  gotobot.co www.gotobot.co;
    # server_name  localhost;

    expires $expires
1 Like

nginx really likes semicolons. (also, make sure the map is before the server block)

2 Likes

Yes, it works now. :smiley: Thanks.

Its weird why it lasts to 2037 when I put only 9d?

location ~* .(?:ico|css|js|gif|jpeg|jpg|png)$ {
expires 9d;
add_header Pragma public;
add_header Cache-Control “public”;
}

1 Like

because that location block is never executed, that 2037 is the “max” from your map

2 Likes

Yes, I’ve did this and it works now:

map $sent_http_content_type $expires {
        default                    off;
        text/html                  epoch;
        text/css                   10d;
        application/javascript     10d;
        ~image/                    10d;
        ~img/                      10d;
        image/png                  10d;
    }#map expires

But what you are saying is that this code is not used now:

location ~* .(?:ico|css|js|gif|jpeg|jpg|png)$ {
expires 9d;
add_header Pragma public;
add_header Cache-Control “public”;
}

How is that?

1 Like

I have no idea how nginx decides what location block to use.

1 Like

I've removed this CNAME as you said but I cannot remove the other since I'm using them to connect to my email there, it is hosted there. Will the mail work if I put them as slaves?

What do you mean only when you query co. zone? What is that? :smiley:

that was probably doing something, I asked what the purpose was, I did not tell you to remove it :smiley:

For the mail to work you need a MX record pointing to a name, and then that name needs to point to one (or more, usually two) IP addresses.

root@Quake:~# for ns in `dig co. ns +short |head -n1`; do dig @$ns gotobot.co ns; done

; <<>> DiG 9.11.3-1ubuntu1.11-Ubuntu <<>> @ns4.cctld.co. gotobot.co ns
; (2 servers found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 50820
;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 8, ADDITIONAL: 1
;; WARNING: recursion requested but not available

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
; COOKIE: ee87dfbc18d04c1ce39f7ae85e7cbff435436d79dc3433d0 (good)
;; QUESTION SECTION:
;gotobot.co.                    IN      NS

;; AUTHORITY SECTION:
gotobot.co.             3600    IN      NS      dns1.nodowntimedomains.com.
gotobot.co.             3600    IN      NS      ns3.nodowntimedomains.com.
gotobot.co.             3600    IN      NS      ns-107.awsdns-13.com.
gotobot.co.             3600    IN      NS      dns2.nodowntimedomains.com.
gotobot.co.             3600    IN      NS      ns-715.awsdns-25.net.
gotobot.co.             3600    IN      NS      ns-1824.awsdns-36.co.uk.
gotobot.co.             3600    IN      NS      ns-1047.awsdns-02.org.
gotobot.co.             3600    IN      NS      ns4.nodowntimedomains.com.

;; Query time: 10 msec
;; SERVER: 2610:a1:1010::21#53(2610:a1:1010::21)
;; WHEN: Thu Mar 26 15:45:08 CET 2020
;; MSG SIZE  rcvd: 299

Your nameservers have mismatching zone versions because they're two independent sets of nameservers. You need to choose one.

1 Like

I removed it because I thought it conflicted with mail.gotobot.co, since * would parse mail?

Ok, so my MX is pointing to a name:

image

and now I need to point that name mail.gotobot.co with an A record to the IP of the other server (http://5.77.36.127/) or to my aws server (184.72.187.19)?

I understand now, how do I pick one? I’ve set in aws only my aws NS?

1 Like

to the server that handles your mail.

It's a choice you'll have to make for yourself, but only keep one set. In your registrar's panel, not in aws.

2 Likes

Ok, but this is what I do not understand, if I remove “ns.nodowntimedomains.com.” server names, how can I have an email that is located there? And if I remove “ns.awsdns” servernames, how can I have an landing page that is located there?

1 Like

You get one set to point to services on the other provider.

2 Likes

Are you sure, I’ve tried to explain once again what is happening:

I have domain www.gotobot.co, and I’ve put in my domain register 8 server names, 4 by AWS and 4 by Eukhost.

image

I’m using AWS with ec2 instance in combination with docker-compose where I have Nginx, client,server, database, and one machine learning model ports. (Recordsets - https://imgur.com/vc7GSZj)

However, I’m using Eukhost for my email which works perfectly with 5.77.36.127:port number and there I login successfully. (Recordsets - https://imgur.com/bZssAns)

Since I have a contact form on my landing page which I connected with that email I had problems with getting mail through so I wanted that mail.gotobot.co connects to the IP address 5.77.36.127 but now that has caused some bigger mixups.

Here are some issues I’m experiencing:

  1. When I and many people that tested for me run “tracert DOMAIN_NAME”, this usually happens, it doesn’t connect or barely connects - https://imgur.com/U6vmKq6
  2. Some people when they go on www.gotobot.co got redirected to my email page?
  3. When I run a test on intodns.com - https://imgur.com/gLfPchx
1 Like

You can use both in one case and one case only: they are perfectly synchronized.

You can use eukhost only or amazon only, your mail will work as long as the mx record is right, wherever it is. (and txt/spf, etc…)

1 Like

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